I want to set a default value for a non nullable field in code first. I have included Microsoft.EntityFrameworkCore but I'm still getting Does not contain
I m trying to migrate my data base using EF core when i run this commande "dotnet ef migrations add Init --context PersistedGrantDbContext -o Migrations/Persis
I have around 40 entities and everytime after I compile and run my app it takes almost 10 seconds whenever DbContext is called for the first time. Is there a wa
I have followed the steps from the following EF Core 5 site in order to store and read items from the CosmosDB. Here is the site: https://www.learnentityframewo
I'm trying to join a big table to a small list of data pairs using EFCore 2.1.1. I want this join to happen server-side, rather than trying to download the who
Say I create a DateTimeOffset value like this: var dt = DateTimeOffset.UtcNow; And I want to store this value in SQL Server using EF Core code-first. How do I
Is there a way for EF Core to intercept the pre insertion, pre update, pre delete, post insert, post update and post delete events of an entity? EF core support
I have a database table with columns of type dateTime. Now I need to see if there already is a row with today's date, but I don't know how to compare the column
I am working on .NET CORE 6 along with EF CORE 7. I need to seed data in joining table but unable to do so and get error. I am seed FileTypeId but not sure why
I am using Visual Studio community edition 2022 and trying to update my Models from database in EntityFrameworkCore 6 (I added new tables and modified some). Wh
I'm trying to write a repository method for Entity Framework Core 2.0 that can handle returning child collections of properties using .ThenInclude, but I'm havi
I have been trying to use lazy loading in ASP.NET core 6, I have followed the documentation to do so. However, the behavior of the lazy loading is not the same
I'm building a Blazor Server app using .NET 6. As an example I have a list of customers that I retrieve from a Sqlite db using Entityframework Core. I want to s
I'm working on ASP.NET Project with .NET 5.0. For Database creation, I've run the command dotnet tool install --global dotnet-ef After the installing, when I
I got this problem when I try to create the database with EntityFramework Core: The property 'Rating.RatingScores' could not be mapped, because it is of typ
I'm using Asp.Net Core Web Api 6 I'm facing an error when migrating my DbContext and when updating the database The Error [17:07:29 INF] Application Is Starting
I'm developing a test Project using asp.net core. For Connecting to database I'm using Entity framework. I add appsetings.json file to the project and change th
I have ASP.Net Core 2.1 with EF Core 2.1. This is how my DbContext class looks like app.DAL.EF -> Layer using app.domain; using Microsoft.EntityFrameworkCo
My Aggregate is like this: public class Order : AggregateRoot { private readonly List<OrderItem> _items = new(); public DateTime Date { get; set;
I'm newer to EF Core, so please forgive me if there is a trivial answer. Take this scenario.... A new web-application is being developed using the latest vers