fluent-interface Questions
2
Solved
I want to implement fluent api to my mvc sites. I got the basics.
So implement object library such as:
public class UIElement{/*...*/}
public class ButtonBase : UIElement{/*...*/}
public class Lin...
Megaphone asked 21/4, 2013 at 5:43
7
Solved
I was recently watching a webcast about how to create a fluent DSL and I have to admit, I don't understand the reasons why one would use such an approach (at least for the given example).
The webc...
Denominative asked 25/2, 2009 at 21:37
1
Solved
Note/Disclaimer: After a few searches, the nearest thing I have I have seen to this post is a post on SO (Method chaining and the finishing problem) which is similar to my question, but doesn't rea...
Evanevander asked 12/3, 2013 at 22:1
1
I was thinking to generate EntityTypeConfiguration dynamically from run time and i don't want any EF dependency in Models[That is why i avoid Data Annotation].
So I declare a custom attribute(or c...
Araujo asked 16/11, 2012 at 20:45
1
Solved
I have a couple independent objects, each of which has a list of a common object. For instance,
public class Project
{
public IEnumerable<CommentEntry<Project>> Comments{get;set;}
}...
Preoccupation asked 16/10, 2012 at 19:58
2
I have a fairly simple composite one to many relationship defined using POCO/Fluent API, one column of which is a string.
I've discovered that the data in this column in our database is inconsist...
Tigre asked 14/9, 2011 at 19:30
2
Solved
I have a class that exposes a fluent interface style that I also want to be thread safe.
At the moment, calling chainable methods on an instance of the class sets up various collections with opera...
Boyette asked 1/9, 2012 at 8:10
6
Solved
this is what I'm trying to achieve:
config.Name("Foo")
.Elements(() => {
Element.Name("element1").Height(23);
Element.Name("element2").Height(31);
})
.Foo(23);
or like this:
.Elements(...
Mesothorax asked 27/4, 2012 at 8:54
4
Solved
I was wondering what would be the best way to implement a .When condition in a fluent interface using method chaining in a Builder object?
For instance how would I implement the .WithSkill() and ....
Exasperate asked 6/4, 2012 at 17:0
1
Solved
I have a base object that I dont want to be mapped in DB as an entity, I only want the properties to be added to the object that is mapped in the DB :
Not mapped object (dont know if it matters bu...
Astrodynamics asked 27/3, 2012 at 17:57
1
Solved
I have a question about defining Foreign Key in EF Code First Fluent API.
I have a scenario like this:
Two class Person and Car. In my scenario Car can have assign Person or not (one or zero relat...
Figureground asked 25/3, 2012 at 8:46
2
Solved
This fluent like class is not strictly immutable because the fields are not final, but is it thread safe, and why?
The thread safety issue I'm concerned with is not the race condition, but the vis...
Isla asked 8/3, 2012 at 16:35
1
Solved
Background:
We have a project with many modules. We're using EntityFramework 4.2 with FluentAPI (CodeFirst).
There is a central project named Diverto.ORM.EntityFramework.SQLServer which contains p...
Electrophotography asked 4/1, 2012 at 17:5
3
Solved
I've been reading about the OO 'fluent interface' approach in Java, JavaScript and Scala and I like the look of it, but have been struggling to see how to reconcile it with a more type-based/functi...
Pogue asked 30/12, 2011 at 16:17
1
Solved
I'd like to use localised validations with the Fluent API like this in Data Annotations:
[Required(ErrorMessageResourceName = "Domain_Address_AddressTypeRequired", ErrorMessageResourceType = typeo...
Runner asked 18/12, 2011 at 16:48
1
Solved
I am developing a rather large database schema using Entity Framework Code First. I prefer the Fluent API over the Data Annotations approach, as it leaves my domain objects as simple POCOs.
In ord...
Muddle asked 30/11, 2011 at 0:43
1
Solved
I am using a fluent interface with inheritance. I declared the base class Constructor protected so you cant create a Foo<Bar> which would result in a ClassCastException on calling add(). But ...
Empanel asked 31/10, 2011 at 20:27
1
Solved
I am experimenting with fluent extension methods.
I have the following simple extension method to perform a safe cast.
public static T As<T>(this Object source)
where T : class
{
return...
Maddux asked 6/10, 2011 at 15:17
1
Solved
I have two tables that look like this:
dbo.ReviewType
ReviewTypeId INT PRIMARY KEY
ShortName CHAR(1) - Unique Index
Description
dbo.Review
ReviewId INT PRIMARY KEY
ReviewType_ShortName CHAR(...
Rutan asked 20/9, 2011 at 16:9
4
Solved
I have the following method:
public static TEventInvocatorParameters Until
<TEventInvocatorParameters, TEventArgs>(this TEventInvocatorParameters p,
Func<TEventArgs, bool> breakCond)...
Encroachment asked 24/8, 2011 at 5:57
5
Solved
Say I have a class with some properties and some methods for manipulating those properties:
public class PersonModel
{
public string Name { get; set; }
public string PrimaryPhoneNumber { get; se...
Damoiselle asked 15/7, 2011 at 9:33
5
Solved
What do I have to do to say that InvokeMethod can invoke a method and when using special options like Repeat it shall exexute after the Repeat.
My problem for now is that the method will already e...
Scalene asked 7/6, 2011 at 16:29
2
Solved
Castle Windsor just came out with a Fluent interface for registering components as an alternative to using XML in a config file. How do I use this Fluent interface to register a Generic interface?
...
Acescent asked 5/6, 2011 at 4:32
3
Solved
How would one create a fluent interface instead of a more tradition approach? Here is a traditional approach:
Interface:
interface IXmlDocumentFactory<T>
{
XmlDocument CreateXml() //serial...
Ataman asked 26/5, 2011 at 13:4
1
Solved
I have a Customer entity which references a collection of Addresses. The complication here is that I want to be able to identify a particular address as the default address.
If possible I would li...
Edmondson asked 9/5, 2011 at 12:28
© 2022 - 2024 — McMap. All rights reserved.