fluent-interface Questions
11
Solved
How can I store an array of doubles to database using Entity Framework Code-First with no impact on the existing code and architecture design?
I've looked at Data Annotation and Fluent API, I've a...
Maltese asked 5/3, 2013 at 10:3
4
I wanted to know the exact difference between method chaining and fluent interface.
As I understand it, method chaining is just running the methods of previous method return objects while avoiding ...
Tarpley asked 26/7, 2017 at 9:7
4
Solved
In C#, with LINQ, if I have en enumeration enumerable, I can do:
// a: Does the enumerable contain an item that satisfies the lambda?
bool contains = enumerable.Any(lambda);
// b: How many items s...
Proselytism asked 20/8, 2012 at 17:15
20
Solved
Method chaining is the practice of object methods returning the object itself in order for the result to be called for another method. Like this:
participant.addSchedule(events[1]).addSchedule(eve...
Oreopithecus asked 9/7, 2009 at 13:44
5
Solved
I know this sounds like a subjective answer, but I will try to make the question as objective as possible, because an objective answer to the question would be the most helpful.
I recently had a c...
Armbruster asked 23/11, 2010 at 12:55
15
Solved
Ruby can add methods to the Number class and other core types to get effects like this:
1.should_equal(1)
But it seems like Python cannot do this. Is this true? And if so, why? Does it have someth...
Engel asked 10/10, 2008 at 18:56
5
Solved
I started writing a fluent interface and took a look at an older piece Martin Fowler wrote on fluent interfaces (which I didn't realize he and Eric Evans coined the term). In the piece, Martin ment...
Euphonium asked 16/3, 2012 at 18:0
4
Solved
Here is what I am currently doing:
modelBuilder.Entity<Product>().Property(e => e.Name).IsRequired();
modelBuilder.Entity<Product>().Property(e => e.UPC).IsRequired();
modelBui...
Pomiculture asked 25/8, 2013 at 1:46
6
Solved
I am working on rewriting my fluent interface for my IoC class library, and when I refactored some code in order to share some common functionality through a base class, I hit upon a snag.
Note: T...
Diegodiehard asked 23/5, 2010 at 22:11
5
Solved
If I try to delete a "child" row I always get an exception. Here is a snipset:
using (var context = new CompanyContext())
{
ItemType itemType = context.ItemTypes.FirstOrDefault(i => i.Name == ...
Chagrin asked 11/10, 2013 at 19:8
2
Solved
I have a Python function "send_message" which takes three arguments:
send_message("i like windmills", to="INBOX", from="OUTBOX")
I am thinking about putting...
Smokedry asked 15/6, 2016 at 6:38
19
Solved
I've just seen a huge regex for Java that made me think a little about maintainability of regular expressions in general. I believe that most people - except some badass perl mongers - would agree ...
Afoot asked 16/10, 2009 at 16:18
10
Solved
I am using PHP 5 and I've heard of a new featured in the object-oriented approach, called 'method chaining'. What is it exactly? How do I implement it?
Vlada asked 16/9, 2010 at 6:4
15
Solved
I'm running EF 4.2 CF and want to create indexes on certain columns in my POCO objects.
As an example lets say we have this employee class:
public class Employee
{
public int EmployeeID { get; s...
Sirois asked 24/11, 2011 at 21:20
5
Solved
I have an object that has a char property:
public class Product
{
public char Code
{
get;
set;
}
}
Entity Framework doesn't seem to be able to map chars (this field is missing from the data...
Isomorph asked 20/7, 2011 at 10:55
4
Solved
I recently came across this expression - but reading up on Wikipedia did not clarify it much for me - I still don't get it:
What's the point of it
How is it used in practice (i.e. how does it ben...
Wisnicki asked 18/1, 2010 at 7:34
7
Solved
I'll show a problem by example. There is a base class with fluent interface:
class FluentPerson
{
private string _FirstName = String.Empty;
private string _LastName = String.Empty;
public Flue...
Halfbeak asked 17/2, 2010 at 6:36
4
Solved
Does NUnit provide a constraint to find whether the actual value is the element of a given enumerable or array, in other words, that it is equal to any of multiple expected values? Something like:
...
Gilchrist asked 27/8, 2014 at 8:20
6
Solved
I have a column "Name" that must be unqiue. No foreign key or anything like that.
EF 6.1 finally supports creating such indexes via Annotations. That has been discussed already on SO. But it seems...
Gourmet asked 27/5, 2014 at 14:49
5
I am trying to subclass str object, and add couple of methods to it. My main purpose is to learn how to do it. Where I am stuck is, am I supposed to subclass string in a metaclass, and create my cl...
Waylonwayman asked 31/8, 2011 at 10:28
1
I'm using FluentEmail in ASP.NET core 2.0 class library which will be sending the Email notification.
Below is the sample code I have tried till now:
using FluentEmail.Core;
using FluentEmail.Raz...
Cauvery asked 17/5, 2018 at 6:50
2
I have created Entity Data Model in Visual Studio. Now I have file with SQL queries and C# classes generated from Model.
Question:
Classes are generated without annotations or code behind (Fluent...
Swain asked 6/5, 2014 at 21:54
2
Solved
I would like to do multiple re.sub() replacements on a string and I'm replacing with different strings each time.
This looks so repetitive when I have many substrings to replace. Can someon...
Bowl asked 20/9, 2017 at 17:40
3
Solved
We are familiar with fluent interfaces for calling methods in java and other programming languages. For eg:
Picasso.with(this).load(url).into(imageView);
This is made possible by setter methods ...
Inwardness asked 21/5, 2017 at 14:41
3
Solved
Given the code
[Test]
public void Test1()
{
var a = new A();
a
.Method1()
.Method2();
}
is it possible to set a breakpoint so that execution pauses after Method1() has executed, but befo...
Parr asked 10/5, 2011 at 8:58
1 Next >
© 2022 - 2024 — McMap. All rights reserved.