725 questions with Entity Framework Core tags

Sort by: Updated
1 answer

.Net Framework > .Net Migration Problem - Incremental upgrade with Entity Framework 6.4.4

Hi, (apologies for the lengthy description) I'm working on setting a roadmap for a phased/incremental upgrade path of a .Net Framework 4.8 solution to .Net 8.0+. The existing solution has a large number of projects with direct project references and has…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,625 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,141 questions
asked 2024-07-19T15:40:33.36+00:00
AndyB 0 Reputation points
answered 2024-07-19T16:00:06.4166667+00:00
Michael Taylor 51,341 Reputation points
2 answers

Cycling problem

Hi, I have 2 entity which have one to many relation between. Lets name them School and student. When I'm creating School I'm getting cycling problem . I did all the configuration in Configure class but nothing worked. There is a way with [JsonIgnore] but…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,387 questions
asked 2024-07-16T19:06:27.2733333+00:00
Atilla Rüstəmli 20 Reputation points
edited a comment 2024-07-18T02:36:48.31+00:00
SurferOnWww 2,486 Reputation points
3 answers One of the answers was accepted by the question author.

This error appears to me. I use .NET 8. The project is divided into three layers. The presentation layer is a web project. The rest of the layers are class libraries. I installed the necessary libraries, all of which are version 8.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,387 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2024-07-16T20:30:25.5766667+00:00
saleh salem 20 Reputation points
commented 2024-07-17T23:07:23.29+00:00
saleh salem 20 Reputation points
2 answers

How to get license terms for Entity Framework 4.3.0 nuget package and also source code?

Hello, I am not sure if this is right forum for this question. What i need is the license terms from Microsoft for using the Entity Framework 4.3.0 nuget package in the application which is disctributed commercially. Also, since Entity Framework is…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,141 questions
asked 2024-07-17T15:15:38.5833333+00:00
Shinde, Kalpana 0 Reputation points
answered 2024-07-17T15:52:12.2333333+00:00
Bruce (SqlWork.com) 61,266 Reputation points
1 answer

How to fix DbContextOptions resolving properly from services to apply EF migration to create database?

I'm trying to run a migration to create my initial database from code, but i'm having difficulties with proper registration of DbContextOptions. My program.cs contains the service registration: var builder = WebApplication.CreateBuilder(args); // Add…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-04-05T22:58:14.0533333+00:00
Vatai Domonkos 10 Reputation points
edited a comment 2024-07-17T11:09:45.19+00:00
Jyotiranjan Behera 0 Reputation points
1 answer

EF Core AUTO_INCREMENT problem with MySQL database

The only problem i have now that i finished my database design is that the AUTO_INCREMENT is not specified when creating the tables by EF Core. This is the modelBuilder modelBuilder.Entity<Conturi>(entity => { …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-07-11T22:03:48.4833333+00:00
Stefan 0 Reputation points
commented 2024-07-17T01:20:36.5766667+00:00
Hongrui Yu-MSFT 1,020 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Entity Framework complains that there is no primary key

using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace WpfApp6.Models; public partial class Product [Key] public int IdProduct { get; set; } public string NameOfProduct { get; set; } = null!; public…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,710 questions
asked 2024-07-09T20:27:16.29+00:00
vitaminchik 486 Reputation points
edited the question 2024-07-16T16:41:14.8+00:00
Dillan Simmons 1 Reputation point Microsoft Employee
1 answer

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…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2023-06-05T15:28:34.3533333+00:00
Erum Mirza 6 Reputation points
commented 2024-07-14T05:23:28.2933333+00:00
Aviad Pineles 20 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…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,327 questions
asked 2023-12-31T01:49:00.7366667+00:00
John Murphy 25 Reputation points
commented 2024-07-13T02:11:37.22+00:00
Mario Escudero 0 Reputation points
2 answers One of the answers was accepted by the question author.

How can I save a collection of CultureInfo type using EF Core without adding backing fields?

In a class, I have a collection of type List<CultureInfo> OfficialLanguages. I need to respect domain driven design for this project. I cannot add a backing field of type List<string> officialLanguagesCodes and handle it that way. When I have…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-07-04T01:15:48.8333333+00:00
Joseph Gregory 20 Reputation points
accepted 2024-07-10T19:00:32.5666667+00:00
Joseph Gregory 20 Reputation points
3 answers

EF Core - High Memory Usage For Query that Runs for 20 seconds

I'm wondering if there is a better way to optimize the below query. Granted, it's pulling in 80,000 - 160,000 records, but the RAM usage on my web server, shoots up to ~3gig while it's running for a total of 20 seconds, when testing it in my API, but,…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2024-06-29T05:22:38.7933333+00:00
muttBunch 100 Reputation points
edited an answer 2024-07-09T15:36:32.0133333+00:00
Bruce (SqlWork.com) 61,266 Reputation points
1 answer

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…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-07-03T23:37:18.52+00:00
Greg Frazer 0 Reputation points
commented 2024-07-08T02:54:29.49+00:00
Hongrui Yu-MSFT 1,020 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

How to save a many to many relationship with Entity Framework

Hi, I have a many to many relationship between Flight and Journey, so I have created an intermediate table to create the relationship: the thing is, I have a list of flights and one Journey, so how can I create the code to make the assembly so I can…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2023-03-21T00:31:43.34+00:00
Jhon Hernandez 21 Reputation points
answered 2024-07-04T08:59:22.9033333+00:00
MARTIN JOY 0 Reputation points
4 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…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,387 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,496 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2024-06-24T17:33:35.47+00:00
Cenk 991 Reputation points
answered 2024-07-02T06:00:31.8533333+00:00
Cenk 991 Reputation points
1 answer

.Net core application with EFCore using Sqlite DB on linux giving error "Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 14: 'unable to open database file'."

I'm running a simple .Net Core application on Linux using EFCore and SQLite, but I'm getting the following error: An exception occurred while iterating over the results of a query for context type 'ApplicationDbContext'. …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-06-27T05:27:57.4366667+00:00
Hrushikesh Patel 0 Reputation points
commented 2024-07-01T20:01:00.1066667+00:00
Bruce (SqlWork.com) 61,266 Reputation points
1 answer

EntityFrameworkCore 7 SetProperty(avar,avalue) Unable to cast object of type 'System.Linq.Expressions.TypedParameterExpression' to type 'System.Linq.Expressions.LambdaExpression'.

My code: 1.Error ADal aDal = new ADal(); Func<AModel, float> p = property => property.Balance; aDal._databaseContext .ModelDbSet .Where(w => w.ID == 5) .Take(1) .ExecuteUpdate(e => e.SetProperty(p, 636)); Out error (Almost no answer…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,625 questions
asked 2023-07-25T11:47:25.1166667+00:00
Allen 5 Reputation points
commented 2024-06-30T12:18:02.7566667+00:00
İsa Sayın 0 Reputation points
0 answers

EF Core .Net 8 error after TLS 1.0 was disabled.

The admins where I work have disabled TLS 1.0 but now all of a sudden, my .Net 8 app is getting the following error: Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2023-12-05T17:06:22.9333333+00:00
Lange Gregory 20 Reputation points
commented 2024-06-29T13:43:40.4933333+00:00
Umut Çömlekçioğlu 0 Reputation points
2 answers One of the answers was accepted by the question author.

Queries with EF Core causes 'Cannot continue the execution because the session is in the kill state'

Some EF Core queries are throwing the following error in our code : Cannot continue the execution because the session is in the kill state. Une erreur grave s'est produite pendant la commande actuelle. Les résultats devront être supprimés, le cas…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,327 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2024-06-07T10:02:04.1466667+00:00
Arthur Menétrey 20 Reputation points
answered 2024-06-26T08:48:21.2633333+00:00
Arthur Menétrey 20 Reputation points
1 answer One of the answers was accepted by the question author.

How to exclude matching records in EF Core Database

I've been working on a project from a gentleman that is no longer on my team. We want to have the below code running as a Windows Service, running every 5 minutes (easy for me to do the Service). However, if we run the below code in our API, manually…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,630 questions
asked 2024-06-20T04:43:10.63+00:00
muttBunch 100 Reputation points
commented 2024-06-23T05:41:37.58+00:00
muttBunch 100 Reputation points
1 answer

Access failed to localdb using EFCore in vs2022

Hi, I created my first Avalonia UI app in MVVM pattern and already installed EFCore 8.0.6 in the project. But failed to access the localdb. My troubleshoot: Created a simple console project. No issue. See attached pic1. In Avalonia app, checked the…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
725 questions
asked 2024-06-22T23:16:10.8533333+00:00
Spellman.Lau 101 Reputation points
answered 2024-06-22T23:28:05.5133333+00:00
Spellman.Lau 101 Reputation points