696 questions with Entity Framework Core tags

Sort by: Updated
4 answers

saving the Identity token in the Aspnetusertokens table

Hi I created an Asp.net core 6 project and I added the Identity framework for authentication and authorization, I would like to add token management and while doing research I realized that Identity also manages the management of tokens because it…

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
608 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
5,466 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 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,216 questions
asked 2023-11-07T11:19:50.1566667+00:00
Marnelle M'BENGUET 20 Reputation points
edited a comment 2024-04-22T20:13:26.7166667+00:00
Angel Tobon 0 Reputation points
1 answer

Maui .Net 8 XCode 15.1 and 15.2 NativeAOT Error in Testflight

Hello, I have an Maui app built with XCode 15.2 and .Net 8. I am using Microsoft.EntityFrameworkCore.Sql V8.0.4 When I install it on my iPad with test flight I get: Model binding is not supported when publishing with NativeAOT. Use a compiled model. I…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,851 questions
asked 2024-04-19T16:55:14.02+00:00
Grant Schaffer 0 Reputation points
answered 2024-04-21T15:11:22.8666667+00:00
Bruce (SqlWork.com) 55,196 Reputation points
1 answer One of the answers was accepted by the question author.

How do I find the method calling Entity Framework that led to an exception

I believe this call is coming from the ASP.NET Identity Library. However, it may be coming from my Blazor code. The below is the entire exception written to the log. How do I find out what method (Identity library or my Blazor code) is calling this? …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 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,381 questions
asked 2024-04-19T20:39:54.0166667+00:00
David Thielen 2,256 Reputation points
commented 2024-04-19T21:29:36.8466667+00:00
David Thielen 2,256 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.
696 questions
asked 2024-04-05T22:58:14.0533333+00:00
Vatai Domonkos 10 Reputation points
answered 2024-04-14T19:55:59.5633333+00:00
Krystian Wawruch 0 Reputation points
1 answer

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”…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
asked 2023-02-07T22:47:49.0433333+00:00
Stephen Ng Qui Sang 10 Reputation points
edited a comment 2024-04-13T20:52:12.7133333+00:00
Yash Jha 0 Reputation points
0 answers

How can we debug with InMemoryDatabase and how can we know exactly the key is duplicate?

How can we debug with InMemoryDatabase Unit test? Also I have question that when I get this error for example "An item with the same key has already been added. Key: 16c568e8-b00d-46b2-ab27-cdb7685839ae" why VS don't point exactly what entity…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,592 questions
asked 2024-04-10T08:27:15.02+00:00
Kha Vo 0 Reputation points
commented 2024-04-11T10:16:47.4033333+00:00
AgaveJoe 26,191 Reputation points
1 answer

An issue implementing migrations in the data layer

Hello I started developing a new c# WPF project. In a solution, I separated the layers as UI and Data. I placed database-related models and configurations in the data layer. Then, I gave the Data project as a reference to the ilse UI project. The problem…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,669 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,216 questions
asked 2024-04-05T08:04:08.8033333+00:00
fatih uyanık 80 Reputation points
commented 2024-04-08T05:33:09.8066667+00:00
Jiale Xue - MSFT 31,196 Reputation points Microsoft Vendor
2 answers

Nuget and The package manager on VS 2022 Community edition cannot find the Microsoft.EntityFrameworkCore

Typing Microsoft.EntityFrameworkCore into the Nuget package manager returns nothing and instead displays the NO package found message. The PM console prints the following error text when NuGet\Install-Package Microsoft.EntityFrameworkCore -Version 8.0.3…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
asked 2024-03-25T19:29:09.87+00:00
Jason Starbuck 0 Reputation points
edited the question 2024-04-02T10:00:47.44+00:00
Zhi Lv - MSFT 32,011 Reputation points Microsoft Vendor
2 answers

Single transaction, multiple service calls to Entity Framework updating database

Hi all; I have a case with a single database defined by a single Entity Framework DbContext. I have things set up where updating the database is via services. This separates things out nicely and makes it easy to mock the database for the bUnit (Blazor…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
asked 2024-03-22T15:46:31.9333333+00:00
David Thielen 2,256 Reputation points
answered 2024-04-01T20:13:59.5533333+00:00
Bruce (SqlWork.com) 55,196 Reputation points
1 answer One of the answers was accepted by the question author.

How do I create a NetTopologySuite.Polygon from a Atlas.BoundingBox?

Hi all; I need to create a Polygon so that in my Entity Framework query I can do: point.Intersects(polygon) The code to create the point is: var center = new TopologyPoint(longitude, latitude) { SRID = 4326 }; I think the code to create the…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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.
12,666 questions
Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
587 questions
asked 2024-03-26T01:11:02.51+00:00
David Thielen 2,256 Reputation points
commented 2024-04-01T18:21:58.51+00:00
rbrundritt 15,211 Reputation points Microsoft Employee
2 answers One of the answers was accepted by the question author.

Can I share a List<T> property across multiple queries via a tracking DbContext?

Hi all; Will the following work? And if so, will it provide a significant performance improvement. My AppUser object includes: public class AppUser { public int Id { get; private set; } // lots of other properties public List<Tag>?…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
asked 2024-04-01T11:06:30.0166667+00:00
David Thielen 2,256 Reputation points
commented 2024-04-01T17:20:51.4133333+00:00
David Thielen 2,256 Reputation points
1 answer One of the answers was accepted by the question author.

how to fix the error occuring when trying the Update-Database command

when I try the command Update-Database i get the error A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,352 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,592 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.
12,666 questions
asked 2024-04-01T12:10:03.4133333+00:00
NISSOU09 40 Reputation points
commented 2024-04-01T12:45:27.4733333+00:00
NISSOU09 40 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.
696 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.
12,666 questions
asked 2023-12-31T01:49:00.7366667+00:00
John Murphy 25 Reputation points
edited a comment 2024-04-01T02:49:23.5733333+00:00
John Murphy 25 Reputation points
1 answer

How to update a record with dependency object with Entity Framework Core?

I'm studying Entity Framework Core version 8 using a Blazor project. The scenario is quite basic: I like to create a simple blog. I have an Article object that has 2 ICollection properties: Category and Tags [Table("Articles")] public class…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
asked 2024-01-05T14:37:58+00:00
Enrico Rossini 176 Reputation points
commented 2024-03-27T11:45:22.25+00:00
Talha Köse 0 Reputation points
1 answer

EF Core Tracking

Most of the articles on EF Core suggest don't enable tracking in EF Core. But if tracking is disabled in EF Core. How to add Audit Logs using EF Core Interceptors? I have tried this but looks like more re work is required for many cases where tracking…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 questions
asked 2024-03-13T18:06:23.0033333+00:00
net 6 newbie 121 Reputation points
commented 2024-03-26T07:53:23.4366667+00:00
Jiale Xue - MSFT 31,196 Reputation points Microsoft Vendor
1 answer

Azure deployment error when trying to install dotnet-ef

I am having trouble deploying my website to Azure due to an error with installing dotnet-ef. I have tried various versions using Nuget and the console, but I'm still unable to upload my app to the cloud. I'm following this tutorial…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 questions
asked 2024-03-24T11:42:29.06+00:00
BalikBalikBoom 0 Reputation points
commented 2024-03-25T14:22:43.04+00:00
BalikBalikBoom 0 Reputation points
4 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…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,148 questions
asked 2023-12-19T20:12:20.84+00:00
UMUT CAN 5 Reputation points
commented 2024-03-24T00:52:07.1+00:00
Hoang Nguyen 0 Reputation points
0 answers

Azure publish error install dotnet-ef

I am trying to publish a website to Azure, but I am running into an error: I do not know how to solve it. I tried to install it, but I get more errors: I also tried cmd but still no luck. command prompt At this point I have no idea what to do now. How…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,592 questions
asked 2024-01-02T20:46:56.6966667+00:00
Athenixz 0 Reputation points
commented 2024-03-22T15:07:11.19+00:00
BalikBalikBoom 0 Reputation points
3 answers One of the answers was accepted by the question author.

Blazor Server: It is possible get Current Loged User In DbContext

Hello, I build blazor server multi tenant application and I wants to use HasQueryFilter in entity framework DbContext for predefined filter with TenantId. But I cannot get Current Loged User in DbContext. I inject to DB Context…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,381 questions
asked 2021-03-17T08:54:54.227+00:00
Jan Mucha 101 Reputation points
commented 2024-03-22T11:05:31.3433333+00:00
Jacek 0 Reputation points
1 answer

Inject EntityFramework DbContext in a .NET 6 Azure Function

Where do I have to put the DbContext in a .NET 6 Azure Function? builder.Services.AddDbContext

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,229 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,592 questions
asked 2023-01-21T13:03:51.93+00:00
Bernhard Sumser 111 Reputation points
commented 2024-03-18T13:24:34.16+00:00
JV 0 Reputation points