780 questions with Developer technologies | .NET | Entity Framework Core tags

Sort by: Updated
0 answers

Nuget restore task failed

I am seeing following error in the restore task: (command is restore ) C:\azp\agent\_work\1\s\source\R2T2CoreTests\R2T2CoreTests.csproj : error NU1101: Unable to find package Microsoft.VisualStudio.Web.CodeGeneration.Design. No packages exist with this…

Developer technologies | .NET | Entity Framework Core
asked 2025-06-25T14:59:35.8366667+00:00
tarun k 365 Reputation points
edited the question 2025-06-26T05:04:50.3666667+00:00
tarun k 365 Reputation points
1 answer

Entity Framework bulk functionalities (bulk insert,bulk delete)

I'm currently working on an enterprise project that requires some logic for bulk functionalities using Entity Framework. We found a couple of options but both are under licence: EF. Core.BulkExtensions…

Developer technologies | .NET | Entity Framework Core
asked 2024-02-19T21:21:00.5366667+00:00
Greivin Chaves 0 Reputation points
commented 2025-06-22T08:39:59.4366667+00:00
Fabien Ménager 0 Reputation points
2 answers

Inserting data in many to many relation ship in EF core

i have two tables 1-Employees (ID ,EmpName) 2- Project (ID,ProjectName) data is already inserted in boh tables ,there is many to many relationship between these two so middle table created in table i.e EmployeesProject now i want to insert data (keys of…

Developer technologies | .NET | Entity Framework Core
asked 2023-06-05T15:28:34.3533333+00:00
Erum Mirza 6 Reputation points
edited an answer 2025-06-10T16:24:53.4033333+00:00
Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
1 answer One of the answers was accepted by the question author.

What is the best way to store URI in EF/SQL Server?

Hi all; I have some properties in an Entity Framework class that are URIs. Is there a way to store them as a URI in the database? Or should I store them as a string? The underlying DB is SQL Database on Azure. thanks - dave

Developer technologies | .NET | Entity Framework Core
Developer technologies | .NET | Other
asked 2023-03-05T01:41:17.8533333+00:00
David Thielen 3,211 Reputation points
commented 2025-06-02T03:52:16.3833333+00:00
Tohid 0 Reputation points
1 answer

Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded.

I am using DDD architecture and the following code changes the aggregate Root (basically adds a comment which is an Entity to the aggregate Root). public sealed class AddCommentToPostCommandHandlers : ICommandHandler<AddCommentToPostCommand,…

Developer technologies | .NET | Entity Framework Core
SQL Server | Other
asked 2024-11-24T08:29:09.3733333+00:00
Arman Espiar 1 Reputation point
edited an answer 2025-05-10T22:19:03.3933333+00:00
Robert Eru 0 Reputation points
5 answers

How to fix Add-Migration problem?

Hi, I am trying to add another entity to the database in my e-commerce solution which includes client and admin projects using Blazor WASM and Server, Asp.Net Core API, and data access projects. However, I am getting an error message as shown below: How…

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | Blazor
Developer technologies | C#
asked 2024-06-24T17:33:35.47+00:00
Cenk 1,036 Reputation points
answered 2025-05-02T12:02:09.08+00:00
Miyari 003 0 Reputation points
0 answers

Great grandchildren ThenInclude() is failing

I have the following query. In the code it's Signup.Effort.Parent var user = await context.AppUsers .Include(user => user.Following!) .ThenInclude(org => org.News) .Include(user => user.Interests) .Include(user…

Developer technologies | .NET | Entity Framework Core
asked 2023-08-14T22:05:45.5233333+00:00
David Thielen 3,211 Reputation points
commented 2025-04-28T12:56:29.71+00:00
George Stocker 0 Reputation points
4 answers

How to call stored procedure procedure using entity framework core?

I work on asp.net core entity framework I have csharp function done using ado dotnet stored proceure  i need to convert it using entity framwork core with another meaning how to call stored proceure using entity framework core 6 and i don't need to use…

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | Other
asked 2023-07-08T10:24:03.9633333+00:00
Ahmed Abd El Aziz 315 Reputation points
answered 2025-04-24T07:14:15.31+00:00
Gitanza 003 0 Reputation points
1 answer

Add-Migration works, but Update-Database says "no migrations to update". I tried deleting the Mig.. Folder

Visual Studio and EF Core problem. Migrations don't work. Add-Migration Title works to update the schema, but Update-Database in NuGet Command Console says that the db is already up to date, but the db does not have my new table in it. I tried…

Developer technologies | .NET | Entity Framework Core
SQL Server | Other
asked 2023-12-31T01:49:00.7366667+00:00
John Murphy 30 Reputation points
commented 2025-04-03T15:55:08.4966667+00:00
Chris Fox 0 Reputation points
3 answers

I'm experiencing problems with EF and SQL Server when running on Azure Webservice. The same code runs fine from VS with same db.

If I turn debugging on and connect my VS to the process, the error doesn't occur. Also I can run the code just fine from Visual Studio towards the same database. I do not Lazy Load. All Queries ens with ToFirstAsync() or ToListAsync() and has a Select to…

Developer technologies | .NET | Entity Framework Core
Azure SQL Database
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,960 questions
Azure | Azure Startups
asked 2025-02-15T10:00:46.1533333+00:00
Tomas Ekenman 0 Reputation points
commented 2025-03-19T00:00:37.5333333+00:00
Siva Nair 2,420 Reputation points Microsoft External Staff Moderator
1 answer

Could not load type 'Microsoft.EntityFrameworkCore.Metadata.Internal.AdHocMapper'

I'm using .NET 8.0, Entity FrameworkCore 9.0.2, MySql.EntityFrameworkCore 9.0.0 and when I try to get data from the database I get the following error. How to resolve this problem? System.TypeLoadException: Could not load type…

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | Other
asked 2025-02-18T09:23:05.2533333+00:00
Misha Kurytsia 0 Reputation points
answered 2025-03-16T15:26:39.54+00:00
chand thiru 0 Reputation points
2 answers

BulkInsert for Entity Framework Core

Entity Framework core now has ExecuteUpdate and ExecuteDelete for doing large updates and deletes But when is EF core going to get the much need BulkInsert that does the job of SQL SERVER's BCP There are third party tools, but they are very expense…

Developer technologies | .NET | Entity Framework Core
asked 2024-07-03T23:37:18.52+00:00
Greg Frazer 0 Reputation points
answered 2025-03-12T15:28:03.72+00:00
Jonathan Magnan 0 Reputation points
4 answers One of the answers was accepted by the question author.

Unable to create a DbContext' Error when Using EF Core in .NET 8 ClassLibrary Project

Hello everyone, I've developed a ClassLibrary project using .NET 8 and C#, and I've utilized EF Core 8 in it. I've defined my own models and context within it. However, when I attempt to use the add-migration command, I encounter this error: "Unable…

Developer technologies | .NET | Entity Framework Core
Developer technologies | .NET | Other
asked 2024-06-01T01:35:11.9766667+00:00
Kamyab Faghih 70 Reputation points
edited an answer 2025-03-03T06:43:39.21+00:00
TP 125.8K Reputation points Volunteer Moderator
6 answers

Error: 'Package restore failed rolling back package change for' while running Scaffold-Dbcontext in Entity Framework Core 7.0.14

Hello, I'm working on a project using .NET Core 7 and encountering an issue when running Scaffold-DbContext with Entity Framework 7.0.14. The error message I'm getting is "there was an error running the selected code generator package restore failed…

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
asked 2023-12-19T20:12:20.84+00:00
UMUT CAN 5 Reputation points
answered 2025-02-27T06:06:32.26+00:00
Pavan Upadhye 0 Reputation points
1 answer

como corrigir erro framework 4.8 na instalação windows server 2016

Framework1002.jpg Bom dia Todos, estou com problema framework 4.8, quando vou instalar windows server 2016, ele reporta esse erro em anexo.

Developer technologies | .NET | Entity Framework Core
asked 2025-02-11T10:35:29.71+00:00
Mutual - Documentos OneDrive 0 Reputation points
edited the question 2025-02-21T08:07:45.08+00:00
Anonymous
1 answer

Cursor pagination for query based full-text search

I need to implement cursor based pagination on an endpoint which accepts a search query. The problem is that since rows will be ranked based on a relevance score derived from a full-text search in natural language, IDs won't be sequential. Does anyone…

Developer technologies | .NET | Entity Framework Core
asked 2025-01-19T21:52:14.1133333+00:00
iKingNinja 120 Reputation points
commented 2025-02-05T06:31:37.02+00:00
Anonymous
1 answer One of the answers was accepted by the question author.

Entity Framework with Dynamic Table Mapping Based on a Parameter (PostgreSQL Partitioning)

I am using Entity Framework with PostgreSQL and need a way to dynamically map a model to different tables based on a parameter. For example, I have a Cars model, and each company should have its own separate table: Cars_A for Company A Cars_B for…

Developer technologies | .NET | Entity Framework Core
Developer technologies | C#
asked 2025-01-31T08:50:51.2966667+00:00
Florin 20 Reputation points
accepted 2025-02-03T06:30:33.2066667+00:00
Florin 20 Reputation points
0 answers

Materialization Interceptor causing null navigation properties

I'm implementing IMaterializationInteceptor.InitializedInstance: https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.diagnostics.imaterializationinterceptor?view=efcore-9.0 If I access a navigation property on the object being…

Developer technologies | .NET | Entity Framework Core
asked 2025-01-30T18:13:11.7933333+00:00
NATHAN B 0 Reputation points
commented 2025-02-03T06:19:37.1166667+00:00
Jack J Jun 25,296 Reputation points
4 answers

Receiving chat messages with SignalR

I tested the SignalR solution in Xamarin Forms and .net core backend and it works great: https://montemagno.com/real-time-communication-for-mobile-with-signalr/ However, I am wondering how to keep receiving the messages when the app is in background…

Developer technologies | .NET | Xamarin
Developer technologies | .NET | Entity Framework Core
asked 2021-01-23T01:29:59.907+00:00
Stesvis 1,041 Reputation points
edited an answer 2025-01-30T16:46:11.3633333+00:00
Bruce (SqlWork.com) 77,926 Reputation points Volunteer Moderator
1 answer One of the answers was accepted by the question author.

Issue with saving single record the form saves multiple records until the modelstate is valid

I am using asp.net core 8 i have a popup form when i click submit with empty fields it returns required validation error and when i fill data in fields then submit again it save multiple records is sql database the number of time i click on submit…

Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | C#
asked 2025-01-27T07:05:16.65+00:00
Asif_360 20 Reputation points
edited a comment 2025-01-28T11:40:27.8466667+00:00
AgaveJoe 30,126 Reputation points