zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

14 results in tag: one-to-many

Using Entity Framework 4.0 with Code-First and POCO: How to Get Parent Object with All its Children?

I'm new to EF 4.0, so maybe this is an easy question. I've got VS2010 RC and the latest EF CTP. I'm trying to implement the "Foreign Keys" code-first example on the EF Team's Design Blog, ...http://blogs.msdn.com/efdesign/archive/2009/10/12/code-only-furt...
code-first entity-framework one-to-many poco
asked by SirEel

Linq to entities - how to select entities with a where condition on their entitycollection?

I found several times people asking for the same question but it seems that the answer was never satisfying altough it should be pretty easy (in theory). Here is my question :...I have an entity called "Company" inside which I have an entityCollection "Em...
eager-loading entitycollection entity-framework linq-to-entities one-to-many
asked by Renaud

Enable cascading deletes in EF Code First without exposing foreign key

When performing a delete of a one-many relationship without exposing the foreign key, EF deletes the parent record and tries to null the foreign key on the child records. This of course causes an error because the foreign key is not nullable. Adding the f...
cascading-deletes code-first entity-framework one-to-many
asked by Craig M

Entity Framework one to many relation code first

I am having my first steps in EF 4.1. Because I was using NHibenate, the code first approach seems to me as the best one. I have problem with good mapping of one-to-many (or many-to-one) realtionship. Let's say I have 2 entities: ...class ClientModel { ...
entity-framework one-to-many relationship
asked by rideronthestorm

How to Map many one-to-many relationship in ASP.NET MVC?

I have few Domain Models - ...Address..., ...Customer..., ...Employee..., ...StoreLocation.... ...Address... has many to one relationship with ...Customer...and ...Employee... and one to one relationship with StoreLocation....public class Address { pu...
c# ef-code-first entity-framework one-to-many
asked by RAM

Why is The navigation property '' declared on type '' has been configured with conflicting multiplicities. error show up?

I have an ...Asp_Users... table and a ...Resource... tables. In the Entity Framework world, I have a ...Asp_Users... POCO and a ...Resource... POCO. Moreover, the ...Resource... POCO is abstract and is part of a Table-per-Hierarchy model. The Table-per-Hi...
associations c# entity-framework mapping one-to-many
asked by user1338998

Insert data simultaneously in entity having one to many relationship

I have two entities: Student and Enrollement having a one-to-many relationship. The entities looks like...public class Student{ [Key] public int Studentid {get; set;} public string fname{get; set;} public string lname{get; set;} public virtual IColl...
asp.net-mvc c# entity-framework insert one-to-many
asked by jpo

EF 6 - One To Many Mapping Always Null

I can't seem to resolve my mapping issue; The relationship is one user may have many venues, A venue must have a user....My ...venue... class looks like:...public class Venue : BaseObject, IBaseObject { [Required] public virtual User Owner { get; ...
asp.net-mvc c# entity-framework one-to-many
asked by LmC

Prevent extra foreign key columns in One to Many relationship

I'm trying to figure out how to configure EF to handle the below situation involving one parent and multiple children:...public class Parent { public int ParentId {get; set;} [ForeignKey("SpecialChildOneId")] public virtual Child SpecialChild...
c# ef-code-first entity-framework entity-framework-6 one-to-many
asked by Brian Vallelunga

How to configure a One-to-Many relationship in EF

I have the following model...public class PageConfig : Base { // Properties Etc.. public ICollection<Image> ScrollerImages { get; set; } } ...My approach is to bind using a junction table { PageConfigID, ImageID }....In my model binder i tried th...
c# entity-framework junction-table model-binding one-to-many
asked by opdb

Using Dynamic LINQ Where in a one-to-many Entity Framework relationship

I am using EF 6 and .net 4.5. I have a "Documents" table with the PK "DocumentId" (Int) and another column, "Title". I have another table called "DocumentFilters" with the columns "DocumentId" (Int) and "DocGUID" (Guid). There is a FK on "Doc Id" between...
c# dynamic-linq entity-framework-6 ienumerable one-to-many
asked by Lenny K

One to many relationship with junction table using Entity Framework code first

I'm creating a database using EF6 code first, and am struggling to create a one-to-many relationship using a junction table....Here's an example of what I'm trying to do:...Foo... entities can contain any number (0-n) of ...Bar... entities, however ...Bar...
ef-code-first entity-framework entity-framework-6 one-to-many
asked by Alfie Woodland

EF6 OutOfMemoryException Evaluating Entity with varbinary(max) Property

In my WebAPI web app, I've added a varbinary(max) field to a table, and a byte[] field to the POCO (BatchCharge). This entity has a child entity (Charge). ...Visual Studio 2013, Entity Framework 6, SQL Server 2014....The data model is as follows:...public...
entity-framework entity-framework-6 one-to-many varbinarymax
asked by Udi Bar-On

How to save/update only parent entities without saving its childs entities in EF6 in asp.net mvc?

I am working on a survey application with Asp.Net MVC....I have a page named Index.cshtml which has a question table and a 'Add New' button.Once button clicked, a popup is opened with jQuery. I am calling a view from controller to fill jQuery dialog named...
asp.net-mvc-4 c# entity-framework entity-framework-6 one-to-many
asked by user6172721

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!