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)

29 results in tag: lazy-loading

What are some alternatives to expanding in a LINQ to ADO.net Data Service query?

I am wondering if there are any alternatives to using the Expand key word when performing an LINQ to ADO.net Data Services query. The expand method does get me the data I am interested in, but it requires me to know all of the sub-objects that I am going...
entity-framework lazy-loading linq wcf-data-services
asked by ChrisHDog

Why is an ICollection required for lazy loading in the entity framework?

I want to write a rich domain class such as...public class Product { public IEnumerable<Photo> Photos {get; private set;} public void AddPhoto(){...} public void RemovePhoto(){...} } ...But the entity framework (V4 code first app...
domain-driven-design entity-framework lazy-loading
asked by Akk

Linq query in Entity Framework multiple children entities include()

This may be a really elementry question but whats a nice way to include multiple children entities when writing a query that spans THREE levels (or more)?...i.e. I have 4 tables: ...Company..., ...Employee..., ...Employee_Car... and ...Employee_Country...
entity-framework lazy-loading linq
asked by Nathan Liu

What's the difference between include/eager loading and lazy loading in Entity Framework?

I've been trying to familiarize myself with the Entity Framework. Most of it seems straight forward, but I'm a bit confused on the difference between eager loading with the Include method and default lazy loading. Both seem like they load related entiti...
eager-loading entity-framework lazy-loading
asked by Major Productions

DTO Pattern + Lazy Loading + Entity Framework + ASP.Net MVC + Auto Mapper

Firstly, Sorry For lengthy question but I have to give some underlying information....We are creating an Application which uses ASP.net MVC, JQuery Templates, Entity Framework, WCF and we used POCO as our domain layer. In our application, there is a WCF ...
asp.net-mvc automapper dto entity-framework lazy-loading
asked by marvelTracker

EF: One-to-many relationship - querying for a subset of the data

I am trying to fetch a collection of entities from a one-to-many relationship as an IQueryable so I can filter the data down before fetching this from the database. ...To make it clear, consider the following example: ...I currently have an entity "User" ...
entity-framework lazy-loading
asked by Karan

How to update an existing Entity from ViewModel using Automapper and EF4 DbContext with Lazy Loading enabled

I am using Automapper to map between Entity and ViewModel object (in both directions). The model uses EF4 DbContext POCOs and needs LazyLoading (and therefore Proxy Generation) enabled. ...I have come across a problem attempting to update an existing enti...
asp.net-mvc automapper dbcontext entity-framework lazy-loading
asked by Paul Taylor

Lazy loading does not work in entity framework 5

I have defined a (poco?) class in my domain project:...public class Club { public Club() { ContactPersons = new HashSet<ContactPerson>(); } public int Id { get; set; } [Required] [StringLength(64)] public string Name { get; se...
asp.net-mvc entity-framework lazy-loading
asked by user1780105

In Entity Framework, why isn't lazy loading working for a one-to-zero-or-one navigation property?

Consider ...Person... and ...Address... classes defined as...class Person { public int PersonId { get; set; } public virtual Address Address { get; set; } } class Address { public int PersonId { get; set; } public virtual Person Person { get; set...
ef-code-first entity-framework entity-framework-5 entity-framework-6 lazy-loading
asked by Mike

How to include all underlying navigation properties automatically with entity framework

Scenario: I'd like to add an entity to the database that would have navigation properties and ...that... entity has navigation properties.. and so on. Basically the tables in the database are connected with each other - all of them....I use EF4.3 and cont...
c# entity-framework lazy-loading navigation-properties
asked by JahManCan

Entity Framework Eager Load Not Returning Data, Lazy Load Does

I'm using code first ...EF5... and I have an object which has a collection defined as ...virtual... (lazy loaded). This returns data when called. However I want it to be eager loaded. I've removed ...virtual... from the property signature but now it alway...
c# entity-framework lazy-loading poco
asked by Barry

Entity Framework 6 context not retrieving navigation properties

I have found many other posts but they are nt facing exactly the same problem. And they are using a slightly different code. SO I think it is worth reviewing this....I´m using EF6 code first, and I created a Client Entity that has some navigation propert...
c# entity-framework lazy-loading linq
asked by Ricker Silva

EF Code First Lazy loading Not Working

I am using code first with EF6 but cannot seem to get lazy loading to work. Eager loading is working fine. I have the following classes:...public class Merchant : User { ... public virtual ICollection<MerchantLocation> MerchantLocations { get; se...
c# entity-framework lazy-loading
asked by user1032657

Entity Framework: How to disable lazy loading for specific query?

Is there any way to disable lazy loading for specific query on Entity Framework 6? I want to use it regularly, but sometimes I want to disable it. I'm using virtual properties to lazy load them.
c# entity-framework lazy-loading
asked by Marco Alves

Entity Framework creating duplicate objects from list when object has composite Primary Key

I have an object with a child collection as such:...public class ClaimGroup : BaseModel { public int Id { get; set; } [Required,StringLength(100)] public string Name { get; set; } public int Order { get; set; } public bool I...
asp.net-mvc-5 c# entity-framework-6 lazy-loading
asked by Rhys Stephens

EF 6 Lazy Loading Disabled but Child Record Loads Anyway

I'm using EF6 code first. There are two tables, ...Lesson... and ...LessonSections.... The ...LessonSections... table has a foreign key to ...Lesson.Id...Here is the ...Lesson... class with none important fields removed:...public partial class Lesson { ...
c# entity-framework entity-framework-6 lazy-loading
asked by StillLearnin

Eager , Lazy and explicit loading in EF6

I have read this ...tutorial... and this ...article... but I don't understand exactly the use of each loading type....I Explain...I have this POCO :...public partial class dpc_gestion { public dpc_gestion() { this.ass_reunion_participant =...
c# entity-framework entity-framework-6 lazy-loading orm
asked by Lamloumi Afif

Entity framework Eager and Lazy load

Trying to figure out the difference between Lazy and Eager loading in entity frameowrk. Say I have the following models:...public interface IBaseEntityObject { public int Id {get; set;} } public abstract class BaseEntityObject : IBaseEntityObject {...
c# eager-loading entity-framework entity-framework-6 lazy-loading
asked by user5326354

Check Lazy Load property has loaded in EF6

I'm using class properties by reflection in some operations so when using DynamicProxy instance it causes to load entire DB. (700+ classes are related with each other)....Is it possible to check if lazy load property loaded or not? Disabling dynamic proxy...
dynamic-proxy entity-framework-6 lazy-loading
asked by hkutluay

Entity framework 6 Lazy loading with db initiation

I am working with EF 6 and Lazy loading. ...class MainPrograme { static void Main(string[] args) { ProgramContext _dbContext = new ProgramContext(); _dbContext.Programs.Add(new Program { SecondProgram = new Sec...
.net c# entity-framework entity-framework-6 lazy-loading
asked by Thilo

Page 1 of 2
  • 1
  • 2
  • »

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!