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

EF Core - System.InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is closed

I'm running an ASP.NET Core 1.0 web app with Entity Framework Core. When the app has been running for a while (24 - 48 hours), the app starts crashing on every request to any endpoint or static resource throwing the error ...System.InvalidOperationExcepti...
asp.net-core c# entity-framework entity-framework-core
asked by severin

Cannot access a disposed object in ASP.NET Core when injecting DbContext

On an ASP.NET Core project I have the following on Startup:... services.AddDbContext<Context>(x => x.UseSqlServer(connectionString)); services.AddTransient<IValidationService, ValidationService>(); services.AddTransient<IValidator<Model>, ModelVali...
asp.net-core entity-framework-core
asked by Miguel Moura

Add migration with different assembly

I am working on a project with ASP.NET CORE 1.0.0 and I am using EntityFrameworkCore. I have separate assemblies and my project structure looks like this:...ProjectSolution -src -1 Domain -Project.Data -2 Api -Project.Api ...
asp.net-core c# ef-migrations entity-framework-core
asked by kdar

"A dependent property in a ReferentialConstraint is mapped to a store-generated column." on a persisted computed column (EntityFramework DB first)

I've implemented a simulated table inheritance construct in my SQL-Server based on the article ...Implementing Table Inheritance in SQL Server.... ...Besides the fact to use simple 1 to 0...1 relationships you create another constraint to a type table tha...
asp.net c# entity-framework entity-framework-6 sql-server-2012
asked by Martin Braun

Could not load type ServiceCollectionExtensions

I'm working with ASP.NET Core 1.0 and trying to configure my DbContext for migrations. I got this exception:...Could not load type 'Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionExtensions' from assembly 'Microsoft.Extensions.Depend...
.net .net-core asp.net-core c# entity-framework-core
asked by Emmanuel Villegas

ASP.NET Core only returning first value of a collection in an entity

I have a class MyEntity with a collection within it:...public class MyEntity { [Key] public int MyId { get; set; } [Display(Name = "Process Name")] public string ProcessName { get; set; } public ICollection<Step> ProcessSteps { get...
asp.net-core entity-framework entity-framework-core
asked by vasa.dhananjay

How to update the model when using database first approach

I used EntityFramework Core database first to create model ...as illustrated in the EF Core documentation...But I don't know how to update the model when the database has been edit.
asp.net-core entity-framework-core
asked by witson

Get custom property of signed in user in .NET Core

I'm working on a .NET Core project and I have added a custom column to the ...ASPNetUsers... table called ...DisplayName... that users set during the registration. I've successfully migrated the tables with that data and everything works fine....However ...
asp.net-core-1.0 asp.net-core-mvc c# entity-framework-core
asked by DethoRhyne

How to generate an entity model from a query w/ EntityFrameworkCore

I'm trying to connect an ASP.NET Core web application to an existing, pretty complex database, in read-only mode....The database is much to complex to map its layout to EFC directly, I just access data from it via a set of queries. Those queries are well-...
asp.net-core c# entity-framework-core entity-model sql-server
asked by Johann Studanski

Mocking DbContext in Entity Framework 6.1

I have found a number of examples that show (apparently) a clear working example of mocking DbContext with EF 6, however, none of them seem to work for me and I am not entirely sure why....This is my unit test code that sets up the mock;...var mockData = ...
c# entity-framework entity-framework-6 moq unit-testing
asked by ChrisBint

.net core and ef core sql server error provider: SQL Network Interfaces, error: 8 - Protocol not supported

I've been trying to develop a new application using .net core in MacOsX using a SQL Server database, but i'm having some problems with the connection because i'm getting the following error:...fail: Microsoft.AspNetCore.Server.Kestrel[13] Connecti...
.net-core asp.net-core-mvc c# entity-framework-core sql-server
asked by Leobardo Mora Castro

Including only Id of related entity in entity framework core

I am currently developing an API with ASP.NET Core and Entity framework core with npgsql as database provider. I have two Entities and they have a one to many relation. The thing is that I only want to include the Id's of the child entity in the JSON resu...
c# entity-framework-core
asked by larzz11

How do I visually design my database with Entity Framework Core?

I am wondering myself, how I should design my database scheme (in terms of efficiency and visuality)....I am developing a ASP.NET Core application with Angular 2 and I am using ...Entity Framework Core... (..."Microsoft.EntityFrameworkCore": "1.0.0"...), ...
c# entity-framework entity-framework-core sql-server typescript
asked by WoIIe

Modelling folder structure in Entity Framework Core

I would like to save an hierarchical folder structure into a SQL database. The class would like this:...public class Folder { public Folder() { Children = new List<Folder>(); } public string Name { get; set; } public int Id {...
c# entity-framework entity-framework-core sql-server
asked by RBasniak

Entity Framework: Foreign Key in code first

What is wrong in my code that i get below error:...Unable to determine a valid ordering for dependent operations. Dependencies may exist due to foreign key constraints, model requirements, or store-generated values...Code:...Class Food:...public class Foo...
c# code-first entity-framework entity-framework-6 foreign-keys
asked by Ali Mottaghi Pour

Configuring DbContext Constructor

I'm trying to use EF Core tools to manage an SqlServer database I'm designing in a C# class library. It's in a class library because I need to use the database schema in both an MVC6 website and some command line tools....I had to convert the class librar...
c# entity-framework-core
asked by Mark Olbert

How to build several left join query in Entity Framework Core

Consider i have below entities:... public class Root { public long Id { get; set; } } public class School : Root { public long StudentId { get; set; } public Student Student { get; set; } public Teacher ...
c# entity-framework-core left-join
asked by dimitri

UWP / EF Core SqlServer - Threading Dependency

I'm attempting to use Microsoft.EntityFrameworkCore.SqlServer, but I appear to not have an appropriate Threading dependency. When using NuGet to attempt to install EF Core SS, I get several messages like the following:...Restoring packages for c:\visual s...
c# entity-framework entity-framework-core sql-server uwp
asked by TRAL

Using ToListAsync() with Automapper ProjectToQueryable()

I have a sync method which I'm trying to convert to async. Basically, the code below projects the data into a DTO, and selects rows and orders them based on properties of the DTO. It also gets only a certain 'page' of the data....return GetDbContext().Ite...
automapper c# entity-framework entity-framework-6
asked by Frank Fajardo

How to add EntityObject Generator in Visual Studio 2015?

I have installed the latest Entity Framework version (EntityFramework.6.1.3) in VS2015. I have added the EF in the project and deleted the 2 .tt files (...edmx_file_name.tt... and ...edmx_file_name.Context.tt...) as they were from the DBContext. ...Now I ...
c# entity-framework entity-framework-6 windows-applications
asked by Makesh Arinha Valappil

Page 73 of 333
  • ««
  • «
  • …
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • …
  • »
  • »»

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!