score:0
You can use relationship using Fluent API (http://www.entityframeworktutorial.net/code-first/configure-one-to-many-relationship-in-code-first.aspx)
in your DbContext :
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
//one-to-many
modelBuilder.Entity<Entry>()
.HasRequired<EventbookEntry>(ev=> ev.EntryId )
.WithMany(ent => ent.EventbookEntries);
}
Source: stackoverflow.com
Related Articles
- Correctly use Interfaces on Navigation Properties Entity Framework
- How to include sorted navigation properties with Entity Framework
- Entity Framework 6 context not retrieving navigation properties
- Entity Framework - Using Navigation Properties over Joins
- problem with navigation properties in entity framework
- Preventing automatic population of circular navigation properties in Entity Framework
- Eager load navigation properties on Entity Framework
- Entity Framework Navigation Properties are not listed while creating a converter
- Entity Framework - loading entities by multiple navigation properties in one request
- How do you save changes to navigation properties using Entity Framework
- Entity Framework procedure call with navigation properties
- Entity Framework Core: using navigation properties instead of joins
- Argument.NullException when dealing with Navigation Properties in Entity Framework
- The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties
- Only initializers, entity members, and entity navigation properties are supported
- 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- Entity Framework 6 Code First Custom Functions
- How to dynamically order by certain entity properties in Entity Framework 7 (Core)
- The specified type member is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- Entity Framework - Selective Condition on Included Navigation Property
- Avoiding repeated projection code in Entity Framework
- Forcing Entity Framework to not generate NCLOB's when building Linq-to-Sql Code (Model First)
- Entity Framework Code First without app.config
- Join vs Navigation property for sub lists in Entity Framework
- How to create a LINQ expression from an Entity Framework navigation property?
- Entity Framework How can I filter my results by a property of a navigation property?
- Entity Framework Code First using context in Controller
- Need Help Filtering A LINQ Query Using An Entity Framework Navigation Property
- many to many mapping in entity framework code first
- How to Create a Run-Time Computed (NotMapped) Value in Entity Framework Code First
- How to get a set number of rows after ordering the records using linq?
- Convert Igrouping Anonymous type to List of string by using lambda
- Hide Columns in DataGridView by field reference not column string name
- Do multiple calls to Distinct() matter
- C# LINQ - Retrieve multiple attributes from single element, convert to structured (non-xml) text
- Selecting Posts of Users whom I am following
- Using LINQ to SQL group, sum and aggreate all together
- Entity Framework n-to-n query, get last records from navigation table
- C# Linq .Select(int.parse) on empty array results in "Input string was not in a correct format"
- Learning LINQ: QuickSort
- Cannot implicitly convert type 'System.Linq.IQueryable<int>' to 'int?'
- How can we use LINQ to sort a list where some predefined values should appear first?
- Null check String.ToLower in Linq Where expression
- Can't bind a GridView to a LINQ to SQL Result
- Create tree hierarchy in json.net with LINQ using c#
- C#, entity framework, linq how to exclude property
- C# equivalent of VB LINQ Query
- How can i split and get distinct words in a list?
- Entity Framework NoTracking not working
- LINQ Equal Operator Error in Query