790 questions with Developer technologies | .NET | Entity Framework Core tags
How can i convert my .NET Framework 4.8 (x86) to .NET Core 8 (x64)
Dear Team, I have migrated my WinForms application from .NET Framework 4.8 to .NET Core 8. Previously, it was built for the x86 platform, but I want to change it to x64. I have updated the configuration in the Configuration Manager and modified the…
Developer technologies | .NET | Entity Framework Core
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
.NET entity framework asp.net showing the following react issues ? how to resolve
Hi Everyone (SME), i am facing following 2 issue while building the web pack which is used to run asp.net with react js application i am using node js version 14.21.3 ERROR in ./node_modules/react-draggable/build/cjs/Draggable.js 210:22 ERROR in…
Developer technologies | .NET | Entity Framework Core
How does EF core tools find my DbContext from my application to generate migration etc
I asked copilot this question, about how EF Core Tool loads my app dll and execute DI service registrations, including builder.Services.AddDbContext(..), then getting my DbContext from DI. In Minimal API program. It answers this: Got it — you’re asking…
Developer technologies | .NET | Entity Framework Core
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
HasDefaultValueSql("getutcdate()").ValueGeneratedOnAdd(); not working as expected
I configure my model as follows: public class CampaignConfiguration : IEntityTypeConfiguration<Campaign> { /// <inheritdoc /> public void Configure(EntityTypeBuilder<Campaign> builder) { builder.HasIndex(new[] {…
Developer technologies | .NET | Entity Framework Core
Graph API RevokeSignInSessions not invalidating refresh tokens
I am trying to use MS Graph RevokeSignInSessions to invalidate a user's refresh tokens to enforce the user to login when the existing access token expires. I set the lifetime of access token to 5 mins. In my tests, when the request completes…
Developer technologies | .NET | Entity Framework Core
what I need to update to win-11 pro?
I wish to upgrade to win-11 pro. My sys: MB, Gigabyte MA785GM-US2H Processor: AMD phenom 11x4 965, 3.40ghz Ram: 4.00 GB, 3.25 GB usable, 800mhz Graphics card: NVIDIA GeForce GT 730 (2 GB) System: 32-bit operating system, x64-based processor Edition:…
Developer technologies | .NET | Entity Framework Core
System.InvalidOperationException: 'The LINQ expression => EntityShaperExpression:
var searchs = new List<string> { "a1", "a2", "a3" }; var result = db.Products.Where(p => searchs.Any(s => p.Content.Contains(s))).ToList(); my query like that run ok in asp.net mvc 5 (vs 2019) but when i use vs…
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Learning EF - Error running Scaffold-DbContext
I am learning how to user Entity Framework where the models are built from an existing SQL server. I ran this command in the package manager: Scaffold-DbContext “Server=xxx; database=Contoso; user id = cnnxxxxx; password = xxxx”…
Developer technologies | .NET | Entity Framework Core
calling stored procedure using entity framework core is throwing error
I am trying to call a stored procedure in my Visual studio application. I am using Entity Framework core. The stored procedure is returning two columns: ID and Type. below is the test result ID Type 1 Basic 2 Test 3 …
Developer technologies | .NET | Entity Framework Core
SQLAzure is not available for your selection of subscription and location
Hi Folks, Trying to use Azure for the first time, I'm using a normal account (i.e not free tier or student) but it is just for a hobby project. I'm following the tutorial here in order to deploy my EFCore webapi…
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
How to use Scaffold-DbContext in .NET Core for Sqlite database
I'm using .NET Core Version 7 and I want to use EF Core to access a Sqlite (*.db3) database file. This file has a password and I want to add the database tables to the project through database first. The scaffold-dbcontext code is as follows, but it…
Developer technologies | .NET | Entity Framework Core
How to filter a query in EF Core using a Value Object (Email value object) and the filter using Contains method?
I'm using C# EF Core version 7. I have a value object called Email which contains a string Value getter property which will hold the email value, and i have entity called Person which have Id and email i have configuered my entity using fluent api as…
Developer technologies | .NET | Entity Framework Core
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
Cannot Migrate Database
Hello all, I am having issue updating the migration of my database. I am currently using .NET 9.0. I have modified one of my files to include the following: protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.UpdateData( …
Developer technologies | .NET | Entity Framework Core
How to fix data loss in designer?
I've faced similar errors before and also fixed them by restarting my pc. But this time restart shortcut didn't work. In "View.cs" code I just inherited its class by "SamplePanel.cs" instead of "Form". Here's code of…
Developer technologies | .NET | Entity Framework Core
Frame work error
I am using VS build task but failing with following error ##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1259,5): Error MSB3644: The reference assemblies for…
Developer technologies | .NET | Entity Framework Core
Can I load CLR (.Net 4.72) and the CorCLR(.Net 8) in the same native process?
Given a native process in windows, can it load both the CLR and the coreCLR ? More Details on the scanrio: Given: 1- A native process ConsoleApp1.exe. 2- Managed C++ /CLR dll (.Net 4.72) , myLib1.dll 3- A COM object which is implemented in .Net 8.0 ,…
Developer technologies | .NET | Entity Framework Core
Command prompt core8 windows 8.1 prompt services adb and serial code product properties
Purchased Core8&Windows 8.1 let's get my system up to date and finish leaving Microsoft let's do this without arguments or preventions money was spent and money is to be held up to contract codes of property rights values and anti theft and copyright…
Developer technologies | .NET | Entity Framework Core