Skip to main content
2 votes
1 answer
179 views

I am attempting to create a new EF Core migration using the add-migration command in the Visual Studio Package Manager, but the command is failing with the following error: The running command ...
user1474992's user avatar
1 vote
0 answers
46 views

I have an ASP.NET Core application using Entity Framework Core (SQL Server). When I run the app in Debug, all migrations execute perfectly — all tables are created in the database as expected. However,...
Mahdi's user avatar
  • 51
1 vote
0 answers
237 views

I get this error when migrating from Entity Framework: dotnet ef migrations add initApp Unable to create a 'DbContext' of type 'RuntimeType'. The exception 'Unable to resolve service for type '...
Andres Miguel Campos's user avatar
2 votes
1 answer
373 views

I am using Entity Framework Core and I want to enforce custom naming conventions automatically for PKs, FKs, indexes, and sequences during migrations. My naming rules are as follows: Primary key (PK):...
Alparslan ŞEN's user avatar
1 vote
0 answers
40 views

I have an Azure Postgres flexible server sitting in a VNet divided into multiple subnets. In a distinct subnet lies an azure app service I am trying to run by publishing it via gitlab. However shortly ...
nicolitre's user avatar
0 votes
1 answer
99 views

I'm migrating a .NET Framework project using EF 6 to EF Core with .NET Standard 2.0. My original EF 6 setup created lowercase, plural table names in the database, but I have manually-created entity ...
Jason Hunter's user avatar
1 vote
0 answers
99 views

I am trying to generate EF Migrations in a .NET Aspire project. I am following the migration example in the documentation. Everything works well with this: builder.AddSqlServerDbContext<...
acmoune's user avatar
  • 3,473
0 votes
0 answers
166 views

Im using EF Core in a .NET 9.0 Web API project, and I was trying to implement automatic migrations on API startup. The current project makes use of Docker containers (Configured using a Docker compose ...
thezuliano's user avatar
1 vote
1 answer
140 views

We're using Entity Framework Core with the code-first approach, and our application has multiple active branches: develop (main integration branch) feature/x (feature-specific branch) Both branches ...
kaushal sharma's user avatar
1 vote
1 answer
116 views

I'm trying to generate a migration script for my ASP.NET Core 9 Web API. I have 2 separate database contexts, AdministrationContext and CodebookContext. CodebookContext contains only one entity, as ...
Goran Petrović's user avatar
1 vote
1 answer
165 views

I have a web app solution in Visual Studio 2022 that always takes at least 5 minutes to build, and I need a way to speed this up. In the solution I have a data project that includes my EF Core ...
BangersForDinner's user avatar
0 votes
1 answer
152 views

I'm working on a .NET 8 project using Entity Framework Core with PostgreSQL. When I run: Update-Database I get the following error: The model for context 'ApplicationDbContext' has pending changes. ...
Renu R's user avatar
  • 1
0 votes
0 answers
32 views

I have two Objects in a one-to-many relation: User on the many and DBConnector on the one side. Users primary Key is Username. DBConnectors primary Key is DBConnectorId. DBConnector has a separate, ...
JBatGUS's user avatar
0 votes
2 answers
65 views

I have a class for users : public class users { public int UserId { get; set; } public string UserName { get; set; } // .... } I want to create a table called users. I write this line in ...
Hosein Ghasemi's user avatar
0 votes
1 answer
220 views

I'm trying to set up a new Blazor project and want to add a SQL Server database to it, which I'm configuring using Entity Framework Core and migrations. I have a simple class User with some basic ...
DarkDiice's user avatar

15 30 50 per page
1
2 3 4 5
221