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

ASP.NET Core Identity: the base class (IdentityUser, IdentityRole, IdentityUserRole e.t.c.) Implementation

Context:...public class ApplicationDbContext : IdentityDbContext<ApplicationUser, ApplicationRole, Guid, UserClaim, UserRole, UserLogin, RoleClaim, UserToken> { public ApplicationDbContext(DbContextOptions<ApplicationDbCon...
asp.net asp.net-core asp.net-identity entity-framework entity-framework-core
asked by Andrey

Explicitly map interface member in Entity Framework 7

I'm attempting to map a class which looks like below but I'm getting an exception regarding the Facility.Projects property being an interface....The property Facility.Projects is of an interface type IProject. If it is a navigation property manually confi...
c# entity-framework entity-framework-core
asked by prestonsmith

Xamarin Forms and Entity Framework Core NetStandard

Recently Xamarin announced support for NetStandard (see ...https://releases.xamarin.com/stable-release-cycle-7-service-release-1/...) and the recently shipped Entity Framework Core supports NetStandard. There was a recent issue with the SQLite.Native pack...
.net-standard-1.5 entity-framework-core xamarin xamarin.android xamarin.forms
asked by wjvii

Entity Framework 6. Disable ModelCaching

OK, Google, I am not able to googling it. ...Documentation... says...The model for that context is then cached and is for all further instances of the context in the app domain. This caching can be disabled by setting the ModelCaching property on the give...
c# caching entity-framework entity-framework-6
asked by user3272018

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

DbContext for background tasks via Dependency Injection

I am probably not thinking in the right direction. I am fairly new to Dependency Injection and ASP.Net Core....I have a ASP.Net core website, and one of the tasks is to import data from an excel sheet to a database that a user will upload. The excel sheet...
asp.net-core asp.net-core-mvc background-process dependency-injection entity-framework-core
asked by Saad Farooq

What is the best way to check if related entity exists in EntityFramework

I have two entities with one-to-zero-or-one relation: ...Version... and ...ChangeLog.... The second one stores file with changelog (for example 'ReadMe.html'). ...public class Version { [Key] public int Id { get; set; } public string Name { g...
c# entity-framework entity-framework-core
asked by Sergеу Isupov

There is no argument given in context

I am trying to implement the ...repository pattern... in ...asp core.... Everything seems to work fine with a few adjustments,except adding it to the controller:... public class HomeController : Controller { private IDocumentRepository _con...
asp.net-core asp.net-mvc c# entity-framework entity-framework-core
asked by Citizen SP

Updating records with Entity Framework Core 1.0 without needing to Update/UpdateRange

In Entity Framework Core 1.0 when I do something like:...var products = _context.Products.ToList(); foreach (var prod in products) { prod.Status = 1; } _context.SaveChanges(); ...I believe it will automatically update all products in the list to hav...
c# entity-framework entity-framework-core
asked by Blake Rivell

Entity Framework Core navigation properties over-eagerly loading

I'm just starting to play with EF core (using NPGSQL), and have noticed some strange behavior on how navigation properties are being loaded without expressly using an 'include'. An example I'm seeing:...ObjectA...ObjectA->List ObjectB | ObjectA->List Obje...
c# entity-framework-core npgsql
asked by Michael Cowart

ASP.Net Core - Using SQLite - Data showing, but not saving with Entity Framework

I am trying to use ...SQLite... in ...ASP.Net Core... with ...EntityFramework Core.......When I am in debug mode (With Visual Studio), everything is working fine....When I publish it, and I am trying to receive data, it is working....Data read controller ...
asp.net asp.net-core entity-framework entity-framework-core sqlite
asked by Abrar Jahin

FirebirdSql.Data.FirebirdClient.FbException: too many open handles to database

Today I did a larger data import into a firebird 2.5.6 database and I got this exception:...System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> Firebi...
entity-framework entity-framework-6 firebird
asked by magicandre1981

Entity Framework: one to zero or one relationship with foreign key on principal

I have a 1:0..1 relationship that I'd like to map with EF 6 using fluent API. The relation consists of a principal, which may or may not have a dependent. A dependent must always have a principal....In the principal, I need to have access to the Id of the...
ef-code-first ef-migrations entity-framework entity-framework-6
asked by fikkatra

EntityFrameworkCore with SQLite on Xamarin returns System.NotImplemented

I created Xamarin.Forms Windows UWP and Android application with shared project. To both(UWP and Android) I imported latest stable NuGet packages: Microsoft.EntityFramework version 1.0.0, Microsoft.EntityFramework.Sqlite version 1.0.0 and Xamarin.Forms 2....
entity-framework-core xamarin xamarin.android xamarin.forms
asked by Stefan Babos

cannot update identity column in Entity Framework Core

I've added a separate Identification to the AspNetUsers table called NumericId that will serve along with the GUID like ID that ASP has for default....I've added the property as an additional property of the ApplicationUser class:...public class Applicati...
asp.net-core-mvc entity-framework-core
asked by DethoRhyne

Update many-to-many entity with ASP.NET Core MVC MultiSelectList

I have a form where I want to update an entity with a many-to-many relationship with another entity, and I'm trying to use the ...select... tag to create the ...MultiSelectList... control. I'm using ASP.NET Core 1.0 with Entity Framework....Say I have the...
asp.net-core-1.0 asp.net-mvc c# entity-framework-core
asked by Mac Reichelt

How to update a detached object with a collection inside on EF Core?

I have a detached object which contains a collection. I'm attaching it using this code...EntityEntry dbEntityEntry = _context.Entry<T>(entity); dbEntityEntry.State = EntityState.Modified; ...Detached object saves perfectly if I change most of the fields..
c# entity-framework entity-framework-core
asked by StackOverflower

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

ASP.NET Core: Dependency Injection for DB CF Migrations

I'm using dependency injection to register my DbContext in the controller of a ASP.NET MVC Core Application like this: ...public void ConfigureServices(IServiceCollection services) { return new MyContext(connectionString); } services.AddScoped...
.net-core asp.net-core-mvc c# dependency-injection entity-framework-core
asked by Lion

Exclude DbContext from migrations to avoid Context-Parameter

I'm using ASP.NET EF Core with MySQL (Pomelo.EntityFrameworkCore.MySql driver). Cause such a context need some lines of specific configuration which the default DbContext with MSSQL doesn't have, I created a MySqlContext:...public class MySqlContext : DbC...
asp.net-core asp.net-core-mvc database-migration ef-code-first entity-framework-core
asked by Lion

Page 76 of 333
  • ««
  • «
  • …
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • …
  • »
  • »»

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!