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

Entity Framework Core - Knowledge Base (KB)

11 results in tag: eager-loading

Entity Framework DbContext How to Eager Load Records Into Memory

I'm using Entity Framework 6 and ...DbContext.... I want to eager load records from the database for the purpose of using these records in the loop. I would like to explain with example (it's just example, please don't say me it is unrealistic in real wor...
c# eager-loading entity-framework entity-framework-6
asked by Steve.NayLinAung

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

Using repository pattern to eager load entities using ThenIclude

My application uses Entity Framework 7 and the repository pattern....The GetById method on the repository supports eager loading of child entities:... public virtual TEntity GetById(int id, params Expression<Func<TEntity, object>>[] paths) { ...
c# eager-loading entity-framework entity-framework-core repository-pattern
asked by aw1975

Entity Framework Eager Loading not working

I want to load a list of objects from db using Entity Framework 6 and Eager loading. But Entity Framework instead uses lazy loading. I've used SQL profiler and the queries are executed when a property referring to the child entities is accessed. By using ...
c# eager-loading entity-framework entity-framework-6
asked by Nikos

Loading multiple levels of related data in Entity Framework Core not working as expected

I want to eagerly load some data related to an ...Article... object....return await context.Articles .Include(x => x.ArticleTags) .ThenInclude(x => x.Tag) // .ThenInclude(x => x.Value) .Include(x => x.Author) .ThenInclu...
c# eager-loading entity-framework entity-framework-core
asked by Sherman Szeto

EF eagerly loading Navigation Properties issue

I am using EF6 with Generic Repository pattern. Recently I experienced a problem trying to delete a composite entity in a single go. Here is a simplified scenario:...public class Parent { public int Id { get; set; } public string Name { get; set; ...
asp.net-mvc c# eager-loading entity-framework entity-framework-6
asked by Amanvir Mundra

Net Core - .Include() results in loop causing Visual Studio debug to crash

My database has a one-to-many relation between "UsageRecord" and "Dimension" ...This is modelled as follows (using a Database-First approach):...public partial class Dimension { ... public virtual ICollection<U...
asp.net-core-mvc dbcontext eager-loading entity-framework-core visual-studio-2017
asked by alessalessio

Eager Loading "No coercion operator is defined between types" after .NET Core/EF Core 2.0 Upgrade

In .NET Core 1.x, we had a method that looked like this:...public async Task<(PaperRecord Component, PaperPointerRecord Pointer)> GetOneAsync(DbSet<PaperPointerRecord> paperPointerRecords, ...
.net-core c# eager-loading entity-framework-core linq
asked by Ristogod

Entity Framework Core 2.0.1 Eager Loading on all nested related entities

I have a simple problem, but cant seem to find a way around it. I am using Entity Framework Core version 2.0.1 and want to eager load all my entities by default....Example:...public class Order { public int Id { get; set; } public string Name { ge...
c# eager-loading entity-framework-core
asked by Jinish

Eager Loading in Entity Framework Core 2.2

Have Entity Framework Core 2.2 removed Eager Loading? The include method won't appear in Visual Studio intellisense, and when I write it manually it gives an error: "it does not contain a definition for 'Include' and no accessible extensions..."...Example...
asp.net-core eager-loading entity-framework-core
asked by Olof84

Eager loading only appear in some result

I am currently using .Net Core 3.0 and I'm building a Web API. I am trying to eager load some related data to the frontend....I have the following classes and dbcontext setup.... public class EntityCommon { public int Id { get; set; } ...
.net-core .net-core-3.0 eager-loading entity-framework-core webapi
asked by weechard

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
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!