Questions tagged [fluent]

Fluent interface is an API which allows method chaining to make code more readable.

Fluent interface is API which allows method chaining to make code more readable.

1148 questions
0
votes
1 answer

Entity Framework FluentAPI naming the Primary Key

By convention, EF generates "PK_<>.<>" as the backing index name for an entity primary key. Call me a control-freak, but I like providing specific names for my primary keys, and I've been unable to locate any specific annotation…
Sam C
  • 303
  • 2
  • 4
0
votes
1 answer

How to configure relationship between classes in an existing db in EF Code First from Database?

I read a number of posts from Julie Lerman and here on SO trying to figure out how to configure the relationship between 2 entities. I used EF Code First to generate the classes from an existing db over which I have no control and that already has a…
Ashok Padmanabhan
  • 2,110
  • 1
  • 19
  • 36
0
votes
0 answers

Fluent API Reference Exception

Abstract: I have am trying my hand at ef 6 and mvc 5 for a company project and cannot seem to get my fluent API to work for one of my mappings, it throws various errors depending on what I try, nothing has worked since I added two fields to one of…
Joshua Van Hoesen
  • 1,684
  • 15
  • 30
0
votes
1 answer

EF Code First Fluent API set Read-Only?

Is there any way to make a field ReadOnly with Fluent API? I am currently using DataAnnotations, [ReadOnly(true)] but I would like to do it with Fluent API. Any help, please!
user3752670
0
votes
1 answer

how can do the join in M:N relationship with linq fluent?

In my database three tables: TableA(IDTableA,...) TableAB(IDTableA, IDTableB,...) TableB(IDTableB,...) In my entity model I have only two entities: TableA { long IDTableA; ICollection TableB; } TableB { long IDTableB; …
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
1 answer

Entity Framework Include Record with certain value in a Navigation Property

I am using Entity Framework 6 Code First and I'm configuring the mapping of my domain model with Fluent API. I don't see how to create a navigation properties for a Table which is a little tricky. I have several objects which can make noise, I would…
tobiak777
  • 3,175
  • 1
  • 32
  • 44
0
votes
2 answers

Getting error "Association references unmapped class" when using interfaces in model

I'm trying to use the automap functionality in fluent to generate a DDL for the following model and program, but somehow I keep getting the error "Association references unmapped class: IRole" when I call the GenerateSchemaCreationScript method in…
Bjarke
  • 21
  • 2
  • 5
0
votes
2 answers

Composite keys issue

I need some help here. I have two solution's that give need to give same result. One of them work's fine, but another dosen't work. public class Calculation { public int ClacID { get; set; } public string CalcNumber { get; set; } public…
0
votes
1 answer

Java - Using Generics to Create a Fluent Interface

In my current assignment, I have to build a new SchemaArtifact object filled with recursive Field objects (both custom classes) for a test case. I also need to do this using a fluent interface. The problem is that my build() function (pops up one…
0
votes
1 answer

Unable to see the VS2013 Designer due to Fluent DLL

Firstly, let me say yes i have done some research. but now im just frustrated as. C:\Users\\AppData\Local\Microsoft\VisualStudio\12.0\Designer\ShadowCache\didkffin.1gk\ecny11ys.s1u\Fluent.dll An attempt was made to load an assembly from a…
New Bee
  • 991
  • 1
  • 13
  • 24
0
votes
1 answer

Fluent API issue - Multiplicity is not valid in Role

Im trying to figure out this issue; (Ef6) I have three tables, 'Goal' , 'GoalType', 'GoalBudget'. I have a one to one between Goal and GoalType which works fine, but when I do the same with GoalBudget which does not work - when I 'update-database' I…
graemegets
  • 265
  • 1
  • 2
  • 9
0
votes
1 answer

Error: fluent.14.5.7 UDF (SEGMENTATION VIOLATION)

I'm using Fluent 14.5.7 and I have some programming error while using my UDF. The simulation I'm trying to solve is a desulfurization process in an horizontal fixed bed reactor. It works perfectly before including the UDF with the reactions (between…
user3660522
  • 1
  • 1
  • 2
0
votes
1 answer

How to use fluentApi to manage nested relations?

I have a User Model public class User { public Guid IdGuid {get;set;} public string Name {get;set;} public virtual List Friends {get;set;} } And I have second model public class UserFriendship{ public Guid FriendShipIdGuid…
Ras
  • 89
  • 1
  • 9
0
votes
1 answer

nhibernate fluent mapping to not include property in auto query

I'm trying to produce a mapping for a class in NHibernate that will map to a query that is hand written to include a field that isn't in the table that the class map relates to. The table would be as follows: Id int Name varchar(50) Parent int The…
Orbittman
  • 1
  • 1
0
votes
1 answer

Syntax for adding constraints to Fluent/Eloquent query

I have seen both of these syntaxes for adding constraints to an existing Fluent/Eloquent $query (such as when appending a constraint based on a conditional): $query = $query->where( 'id','=',1 ); and $query->where( 'id','=',1 ); Is there any…
dspitzle
  • 740
  • 2
  • 9
  • 26