Skip to main content
0votes
0answers
7views

How to correctly use AddDbContext as scoped and AddDbContextFactory as singleton simultaneously in ASP.NET Core?

I need to use both AddDbContext<MyContext> (scoped) and AddDbContextFactory<MyContext> (singleton) in my ASP.NET Core application. The DbContextFactory will be used in background tasks, ...
Max Bündchen's user avatar
0votes
0answers
28views

Entity Framework Core tries to insert non-existent column 'PecaIdPeca' even with explicit mapping

I'm facing a problem when saving entities with Entity Framework Core 6 (without migrations, SQL Server database). Even with the explicit mapping of foreign keys, EF Core tries to insert a column that ...
DeepDish's user avatar
0votes
0answers
25views

Owned collection property not handled as property by EF Core

I already had a question related to this property of mine, and I got bashed by some of the community members on why I expect EF Core to treat a regular property like a regular property and not as a ...
ZorgoZ's user avatar
  • 3,598
0votes
0answers
34views

EF Core override Identity logic using Interceptor

I am in the early stages of converting an .Net Framework application to .Net 8+. This is a phased project, so at this stage I am trying to move from Entity Framework 6 to EF Core 3.1 (the latest ...
NuclearProgrammer's user avatar
0votes
0answers
28views

Mapping Oracle tables in Entity Framework Core [closed]

I am building an application in ASP.NET Core 8.0 MVC. For data layer and mapping I am going to use Entity Framework Core. There is an existing Oracle database, so I am going to follow a database-first ...
Siamak's user avatar
0votes
0answers
78views

Angular 19 returning partially correct DTOs from server eventhough all server data is correct

Return in controller shows "mostly" correct data but when returning it on client side is null. I use Angular 19, .NET Core and EF Core. The mapping seems to be selective. I create an Article ...
wicked.cosmos's user avatar
0votes
0answers
21views

Is there any tool that reads a script.sql and generate a Entity Framework configuration? [closed]

I want to use Entity Framework with a old database. I have the script.sql to create the database. Is there any way or tool that will read the script and generate the EF configuration? I haven't found ...
Ivan Martinho's user avatar
0votes
2answers
61views

EF Core doesn't map foreign keys properly when creating new entities

I'm having trouble creating new entities with one-to-one relationships. EF Core is not assigning the foreign keys properly. As an example, let's take two entities: public class User { public int ...
dave's user avatar
1vote
0answers
54views

I'm trying to understand TransactionScope and connection pooling

I use TransactionScope and I have problems with understanding what determines transaction promotion to distributed transaction. With .NET on linux, there is no MSDTC, so such promotion causes an ...
mdzieg's user avatar
1vote
0answers
61views

Microsoft.EntityFrameworkCore.DbUpdateException ef database table not exists while it exists

I got into this error, While i can confirm I do have the database at the root of my application with the relevant table. Microsoft.EntityFrameworkCore.DbUpdateException: 'An error occurred while ...
Muhammad Faizan Khan's user avatar
2votes
2answers
89views

EF Core temporal table on owned entity

I have an EF Core defined table, and a child entity that is configured using OwnsOne without using a secondary table. The properties of the child entity are stored in the same table as the parent ...
Mark Lisoway's user avatar
1vote
1answer
42views

npgsql call jsonb_path_exists on string mapped jsonb

I've got a table with the filed string Data { get; set; } of type jsonb: modelBuilder.Entity<LayoutEntity>(b => { b.Property(p => p.Data).IsRequired().HasColumnName("data")....
Hille's user avatar
  • 2,331
1vote
1answer
77views

I have problem to save new data in database using EF Core in ASP.NET Core

I want to create a test website for recording a company's information. After running the software and entering three data entries, everything goes well. However, after registering the fourth data ...
Abozar Nazari Zohan's user avatar
1vote
2answers
72views

How to map a boolean property based on shadow property in EF Core .NET 8

I have an entity Foo in my .NET 8 application that represents a tenanted object. In the database, it has these properties: Id TenantId (can be null) In my C# entity class, I want to have: Id ...
Itori's user avatar
0votes
0answers
72views

EF Core 8: Properties<T>.HaveConversion<TValueConverter>() of base record type not using the supplied value converter

I have an ASP.NET Core 8.0 Web API project with EF Core, and I'm trying to use strongly-typed IDs. Previously, I had a couple models with these strongly-typed IDs and each have their own value ...
N.T. Dang's user avatar

153050per page
close