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)

6642 results

What is the correct use of IDatabaseInitializer in EF?

I have a custom DatabaseInitialiser which is below.../// <summary> /// Implements the IDatabaseInitializer to provide a custom database initialisation for the context. /// </summary> /// <typeparam name="TContext">TContext is the DbContext</typeparam> pub...
c# ef-code-first ef-migrations entity-framework entity-framework-6
asked by ashutosh raina

Entity Framework 6 Unable to retrive metadata

I am using EF 6 pre-3....Product model:...namespace ProductStore.Models { public class Product { [ScaffoldColumn(false)] public int Id { get; set; } [Required] public string Name { get; set; } public decimal...
c# entity-framework entity-framework-6
asked by Alvin

EntityFramework.Extended Update not working - can't convert DynamicProxy

I am using Entity Framework 6 and tried to use EntityFramework.Extended to do some batch updates:...db.TicketOrderItems .Where(i => !i.IsDeleted && !i.Order.IsCompleted && i.Order.OrderDate < margin) .Update(i => new TicketOrderItem { IsDeleted = true...
c# entity-framework entity-framework-6 entity-framework-extended sql
asked by Christoph Fink

Multi-tenancy and connection pool using EF 6

We have developed a multi-tenant application using EF 4.3 Code First Model, where each tenant will have their own separate database. Since, we are expecting bit high number of tenants, we want to maintain the connection pool across tenants. ...In order to...
connection-pooling entity-framework entity-framework-6
asked by Hitesh

Change name of Identity Column for all Entities

I am in the process of creating a domain model and would like to have a "BaseEntity" class with an "Id" property (and some other audit tracking stuff). The Id property is the primary key and each Entity in my Domain Model will inherit from the BaseEntity...
entity-framework entity-framework-6
asked by lafferrs

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

Can I use Entity Framework on Windows Phone 8

Is it possible to use Entity Framework to save data to a SQL CE database in isolated storage on Windows Phone 8?...When I try and add a reference to EF 5 using NuGet I get the error:..."Failed to add reference to 'System.Data.Entity'. Please make sure tha...
entity-framework entity-framework-core windows-phone-7
asked by Steve Chadbourne

Entity Framework 6 - how to convert this line to async?

I am wondering how do I change this statement to be async?... var findBarCode = context.Barcodes .Where(x => x.Code == barcode) .Select(x => x.Product).FirstOrDefault(); ...I don't see like any ...async where... statement I can use.
.net async-await entity-framework entity-framework-6
asked by chobo2

Entity Framework 6 Code First function mapping

I want integrate Entity Framework 6 to our system, but have problem....I want to use Code First. I don’t want to use Database First *.edmx file for other reasons....I use attribute mapping [Table], [Column] and this works fine...Database has many User-D...
c# ef-code-first entity-framework entity-framework-6 sql-function
asked by Alexey

The type 'System.Data.Spatial.DbGeography' must be a non-nullable value type in order to use it as parameter 'T'

I'm using EF 6 and I'm getting a really strange error on one of my models:...The fields configuration is : ...Property(x => x.IncidentLocationGps).HasColumnName("IncidentLocationGPS").IsOptional(); ...And the error is:...The type 'System.Data.Spatial.DbGe...
entity-framework entity-framework-6
asked by EdsonF

Entity Framework (6) Performance Optimisation advice

I have an ADO.Net Data Access layer in my application that uses basic ADO.Net coupled with CRUD stored procedures (one per operation e.g. Select_myTable, Insert_myTable). As you can imagine, in a large system (like ours), the number of DB objects required...
.net c# entity-framework entity-framework-6 performance
asked by Obsidian Phoenix

EntityFramework (6) and async ( waitingForActivation)?

I've downloaded ...EF6... ( in order to use ...async...)...So I wrote this simple method : ... public async Task<List<int>> MyasyncMethod() { var locations = await MyDumpEntities.AgeGroups.Select(f=>f.endYear).ToListAsync(); ret...
.net-4.5 async-await c# entity-framework entity-framework-6
asked by Royi Namir

EF6 Beta1 - db.Database.CreateIfNotExists(); doesn't create the database anymore after enabling the migration

db.Database.CreateIfNotExists(); doesn't create the database anymore and always return true after enabling the migration. I don't see anything mentioned about it in release node as well. Is it the bug?...Note that both AutomaticMigrationsEnabled = true or...
entity-framework entity-framework-6
asked by Michael Sync

How to cancel an async query the right way

This is a follow up question to ...this question.......I'm trying to load data from my database which will take 5-10 seconds, but I want the GUI to stay responsive and also it should be cancellable....private CancellationTokenSource _source; public IEnum...
.net c# entity-framework entity-framework-6 wpf
asked by Staeff

Could not load type 'System.Data.Entity.DbSetExtensions' from assembly 'EntityFramework

Updated from entityframework 6.0.0-beta1 to 6.0.0-rc1 and when logging into my MVC5 application i get the following error... {"Could not load type 'System.Data.Entity.DbSetExtensions' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, Publi...
asp.net-identity asp.net-mvc-5 entity-framework entity-framework-6
asked by Tim

EF6/Code First: Super slow during the 1st query, but only in Debug

I'm using EF6 rc1 with Code First strategy, without precompiled views and the problem is: If I compile and run the exe application it takes like 15 seconds to run the first query (that's okay, since I'm still working on the pre-generated views). But if I ...
entity-framework entity-framework-6 visual-studio-2013
asked by Adauto Ramalho

The type 'Company.Model.User' and the type 'Company.Core.Model.User' both have the same simple name of 'User' and so cannot be used in the same model

I have a base entity class ...MyCompany.Core.Model.User... which is to be used for common properties of a ...User... entity:...public class User { public string Username { get; set; } public string Usercode { get; set; } } ...I also have a base ma...
ef-code-first entity entity-framework entity-framework-6 inheritance
asked by Brett Postin

ObjectContext.GetObjectType(e.GetType()) not returning the entity type of the POCO entity

The ...ObjectContext.GetObjectType Method... should return "the entity type of the POCO entity associated with a proxy object of a specified type"...So how come in my code it just returns the proxy?...I am using entity framework 6 release candidate... ...
c# entity-framework entity-framework-6
asked by Colin

Entering keys manually with Entity Framework

I'm trying to use Entity Framework code first for a simple database project and I run into a problem I simply cannot figure out. ...I noticed EF was setting the ID for my tables automatically increasing by 1 each time, completely ignoring the value I ente...
asp.net c# entity-framework entity-framework-core sql
asked by JCafe

EntityFramework 6 RC1 Include on Many-to-Many property fails

I have a many-to-many relationship between Agents and AgentGroups (psuedocode, abbreviated)....public class Agent { public virtual List<AgentGroup> AgentGroups { get; set; } } public class AgentGroup { public virtual List<Agent> Agents { get; ...
c# entity-framework entity-framework-6
asked by Celeste

Page 2 of 333
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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!