score:2
Accepted answer
[ForeignKey("GroupId")]
public virtual Group Group { get; set; }
score:0
modelBuilder.Entity<GroupMetier>()
.HasRequired<Group>(gm => gm.Group)
.WithOptional(g => g.GroupMetier)
.Map(g => g.MapKey("GROUP_ID"));
score:1
[ForeignKey("GROUP_ID")]
public virtual Group Group { get; set; }
Source: stackoverflow.com
Related Query
- one to zero or one relationship in entity framework
- linq to one to many relationship Entity framework
- How to configure one to many relationship using Entity Framework Core fluent API
- one to many relationship in Entity Framework on the same table
- Entity Framework - 1 to 1 relationship where one end is not a primary key
- Entity Framework One to Many Relationship Model - How to select column from the child table
- Entity Framework 6.1.2: Zero or One to Many
- The type of one of the expressions in the join clause is incorrect in Entity Framework
- Entity Framework select one of each group by date
- Entity Framework Core: many-to-many relationship with same entity
- Entity Framework - querying a many-to-many relationship table
- Entity Framework - An item with the same key has already been added. - Error when trying to define foreign key relationship
- entity framework returning only one value but the list size is correct
- How to query many-to-many relationship with 'AND' condition using LINQ and Entity Framework
- Force inner join with many-to-many relationship entity framework
- Query a many to many relationship with Entity Framework and .NET 3.5
- Join multiple entities, 2 DbSet with one List in Entity framework
- Pull data from multiple tables in one SQL query using LINQ and Entity Framework (Core)
- Entity Framework Core 2 One to Many created with Fluent API
- Entity Framework - Get 'fake' navigation property within one query
- updating data in many-to-many relationship in entity framework in code first existing database
- Force Entity Framework to update several records in one round trip.
- Entity Framework group by age range starting at zero
- How to convert Collection of One Class type to Another Class Type collection in Entity Framework
- Entity framework - Index (zero based) must be greater than or equal to zero
- Entity Framework foreign key relationship returns no data
- Counting in a Many-To-Many Relationship in Entity Framework
- Entity Framework infers relationship
- Is it possible to disable proxy in one Entity Framework query?
- C# Entity Framework Core: how do I get the relationship of the bill to the vendor without including the vendor's list of bills?
More Query from same tag
- Iterate through elements of the same name and return attribute by another attribute value
- C# WebApi refactoring Select Linq
- Xamarin Linq insert/update Sqlite table record with generated column
- LINQ join lambda syntax - need to translate this from query
- LINQ avoid specific grouping
- Problem in getting Minimum length using LINQ?
- Selection from List of tuple to List of objects C#
- How to order data with matching ID from another table using linq?
- Compare two objects based on criteria
- Sub Query Where X in (from...?
- Cosmos Db linq query for child item not working
- Order flattened list without changing group order
- Linq query based on the condition
- conditional statement in linq query
- Using Linq to get XML data from database
- LINQ show result as array
- How to convert an Array to a Bindinglist?
- LINQ OrderBy from Entity Framework only positive values first
- Changing values of all decimal fields of a class
- Comparing Sum Methods in C#
- Match all tickets on a particular day
- Entity Framework Core count with expression parameter
- How can I do a "one hit" Linq query with nullable values?
- Filtering by higher nodes attributes linq
- Mimic PHP's ksort in C#
- Query a list where no values are returned
- Dynamic Expressions and Dynamic String Manipulation
- Linq left join with condition with nullable string
- How to improve performance of ordering list multiple times after getting data from database
- query expressions issue in Join()