Using Entity Framework Core 7.0.2 in ASP.NET Core Web API written in C#. I have multiple tables and they are all connected with one-to-many relation. ...
Using Entity Framework Core 7.0.2 in ASP.NET Core Web API written in C#. I have multiple tables and they are all connected with one-to-many relation. ...
I'm building an ASP.NET Web Api with simple CRUD operations and a Database which should be generated using EF Code First and Migrations. In terms of t ...
I am working on an ASP.NET Core project using code first I want to alter database design. I have a case were I need to add two foreign keys to the sam ...
Similar questions are: More than one DbContext was found - answers mainly discuss syntax Unable to create an object of type 'ApplicationDbContext'. ...
I am trying to run the migration in order to create sqlite DB in .net core 6. But getting the following error Unable to create an object for DataC ...
I am trying to add data rows to the DB is created using migrations using data in CSV file, but I did not succeeded. The migration is empty. I am 100% ...
System.InvalidOperationException: 'Cannot modify ServiceCollection after application is built.' When I run the program I get the above error. ...
The idea of my application is to be divided in separate project for database access, and separate project for business logic. I've been struggling wit ...
I have an index like this: And with this code, I can create the index due to STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF are t ...
My project retrieves the connection string from environment variables both from the app service and the local project. The app works fine in develo ...
I'm trying to move a project from using Dapper to Microsoft.EntityFrameworkCore.SqlServer. I've created the entities and their respective mappings(co ...
I think the title is a tiny bit misleading, so let me explain what I want to do. I have a series of EF Core migrations (about 40) and some of them ar ...
Here is info about our technical development environment : .NET Core 3.1 PostgreSQL 14.2, compiled by Visual C++ build 1914, 64-bit EntityFram ...
so I have to create two relationships between Users, the one is coordinators users and professors users can write multiple comments to multiple studen ...
I created a .netcore webapi targeting framework 3.1. Added the required classes and code in ApplicationUser and ApplicationDbContext and in startup se ...
Currently I'm using .NET 6 with VS Code. My project layers are: 1) A webapi layer It includes Controllers Connection String Program.cs .c ...
I am using Entity Framework for a web application. I am trying to create a new migration, but I am getting the following error: Here is my Applicat ...
I am using EF Core 6 Code First approach. When I define a new entity with a required field, EF migrations create for that always an empty default cons ...
. Answers to this question are eligible for a +100 reputation bounty. j ...
When running the command: "dotnet ef migrations add init -o" it gives an error for not finding the database connection string. I'm using the file "sec ...