Category "entity-framework-core"

SQLite Error 14: 'unable to open database file' with EF Core code first

I am getting an SQLite Error 14: 'unable to open database file' with EF Core code first, no idea why. I worked fine the first time, the database file got crea

What would cause a for / foreach loop to break without explicitly calling a break?

I have a durable function that calls a method that simply adds a row to an efcore object. It doesn't call db save. When I step through the code, and get to the

Add entity data model (edmx file) to .net core API

I have .Net Core 5.0 API project contains another .Net Core Class Library. Also I have exiting SQl Server Database. How can create edmx using .net core project

Entity Framework Long Timeout on Queries from Azure PostgresSQL DB

I am having an issue with excessivly long timeouts with calls to an Azure PostgresSQL server. On rare occasions, the call to the database will take approximate

Entity Framework Core error "Column names in each table must be unique"

I have manually added the column IdCategory to my table Books, and now each time I try to run Update-Database, I get this error: fail: Microsoft.EntityFramewor

How to set threading mode in SQLite with Entity Framework?

I'm using SQLite with Entity Framework Core (RC1). I read, that SQLite supports three different threading modes: Single-thread, Multi-thread and Serialized.

The required column was not present in the results of a 'FromSql' operation

I've just starting learning MVC6 with EF7. I have a stored proc that I'd like to return a portion of the fields that are in my model. If I don't return every

How to customize migration generation in EF Core Code First?

There is a special base table type in my DbContext. And when inherited from it I need to generate an additional "SQL" migration operation to create a specific t

How to get only specific tables to create models from database with Entity Framework Core in C#

I'm using Scaffold-DbContext to create models from an existing database, but it auto pluralizes the table names and I don't want that. It also gets all the tabl

.net core injecting and resolving services

I am trying my hand at .net core web api. I have created a static method for registering my controllers like this: public static class RegistrationExtensions {

Unable to resolve service for type Microsoft.EntityFrameworkCore.DbContextOptions

When I want to add controller using ASP.NET Core MVC with views: enter image description here This is my DbContext class: namespace Infrastructure { public

The required library libhostfxr.so could not be found. Netcore Linux

❯ dotnet ef A fatal error occurred. The required library libhostfxr.so could not be found. If this is a self-contained application, that library shou

ASP.NET Core: Error while Updating Migration (Database first approach)

I have created an application in .NET Core where I am trying with database first approach. I was able to add Migration using "Add-Migration InitialCreate" but

.Net Core 3.0 possible object cycle was detected which is not supported

I have 2 entities that are related as one to many public class Restaurant { public int RestaurantId {get;set;} public string Name {get;set;} public Li