743 questions with Entity Framework Core tags

Sort by: Updated
1 answer

Embedding of Blazor Server Component in Web Forms

We have a legacy application on ASP.NET Web Forms (version .NET 4.8), now we want to shift it to latest tech stack Blazor using Server Hosting Model only (version .NET 8). I am facing issues in embedding the Blazor Server components in Web Forms. Is…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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,584 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,494 questions
asked 2024-10-18T07:27:11.24+00:00
Aima Maqsood 0 Reputation points
edited an answer 2024-10-18T16:27:00.2966667+00:00
Bruce (SqlWork.com) 65,576 Reputation points
1 answer

Blazor Server with Entity Framework Core Code First

Hello, we are currently evaluating the usability of Entity Framework Core Code First in a Blazor Server application. We try to migrate from a Database First approach where we created a DbContext instance (by a IDbContextFactory) per database…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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,584 questions
asked 2024-10-04T11:46:31.28+00:00
Sieber, Richard 0 Reputation points
commented 2024-10-16T06:37:45.1066667+00:00
JasonPan - MSFT 5,796 Reputation points Microsoft Vendor
0 answers

How to fix an error System.TypeLoadException: in an swagger api project ?

System.TypeLoadException: Method 'get_LockReleaseBehavior' in type 'MySql.EntityFrameworkCore.Migrations.Internal.MySQLHistoryRepository' from assembly 'MySql.EntityFrameworkCore, Version=0.0.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 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,865 questions
asked 2024-10-11T08:15:59.3133333+00:00
Mathis De Sousa 0 Reputation points
commented 2024-10-14T07:22:47.8766667+00:00
Ping Ni-MSFT 4,335 Reputation points Microsoft Vendor
1 answer

efcore 迁移oracle数据库 comment 中文乱码

Microsoft.EntityFrameworkCore 7.0.9 oracle 19c SIMPLIFIED CHINESE_CHINA.AL32UTF8 环境如上,迁移到数据库后,所有注解(表注解和字段注解)中文都是乱码

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2023-08-02T09:50:59.7533333+00:00
xize zhang 5 Reputation points
answered 2024-10-09T06:24:40.32+00:00
加程 钱 0 Reputation points
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.
743 questions
asked 2024-03-22T15:46:31.9333333+00:00
David Thielen 3,121 Reputation points
commented 2024-10-07T20:53:35.8333333+00:00
Martin Dimitrov 0 Reputation points
1 answer One of the answers was accepted by the question author.

Entity Frame Core ExecuteUpdate Compiling error

The following codes are all working great! string? newval = null; indexDB.TabeABC .Where(b => b.PropertyABC != null) .ExecuteUpdate(setters => setters.SetProperty(b => b.PropertyABC, newval)); However, this does not even pass…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2024-10-06T21:22:19.8766667+00:00
Ning Zhu 131 Reputation points
accepted 2024-10-07T11:44:35.2+00:00
Ning Zhu 131 Reputation points
0 answers

Getting HTML and Javascript into entity framework database

I store some data in textboxes how do I get this into the entity framework database?         <h1>Hello, world!</h1> <h2>The time on the server is @DateTime.Now </h2> <input id="lat" name="lat"…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,877 questions
asked 2024-09-24T06:19:39.72+00:00
rob m 256 Reputation points
commented 2024-10-07T09:46:35.75+00:00
Hongrui Yu-MSFT 2,075 Reputation points Microsoft Vendor
2 answers

Can't Remove-Migration because of default ID (but Add-Migration worked fine)

I messed up the seed data, and now when I try the "Remove-Migration" command I get this error. The "Add-Migration" command gave me no problems, however. Is this an error? How can I remove the migration? Unable to create a 'DbContext'…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2024-09-12T18:36:28.3833333+00:00
E 0 Reputation points
commented 2024-10-07T09:29:08.16+00:00
Hongrui Yu-MSFT 2,075 Reputation points Microsoft Vendor
1 answer

How to fix .NET Framework error

keeps saying See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Data.Entity.Core.EntityException: The underlying provider failed on Open.…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,877 questions
asked 2024-09-12T02:58:40.3433333+00:00
Ryan Reventlow 0 Reputation points
commented 2024-10-07T09:28:05.95+00:00
Hongrui Yu-MSFT 2,075 Reputation points Microsoft Vendor
0 answers

内存占用率很高,但任务管理器却没有显示是什么进程。

Windows10x64,16G内存, 电脑开机后占用约30%,一分钟后内存占用率达到80%左右,但任务管理器没有占用内存过高的程序。 使用poolmon查看,得知是CTNP占用内存过高,运行 c:>findstr /m /l /s CTNP *.sys,没有答案。 Tag Type Allocs Frees Diff Bytes Per Alloc CTNP Nonp 2315 ( …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2023-10-22T06:01:19.18+00:00
andy co 0 Reputation points
commented 2024-10-04T16:21:38.88+00:00
chaofan zhang 0 Reputation points
2 answers One of the answers was accepted by the question author.

Using IDENTITY_INSERT with FK_ChildTable_ParentTable?

Hello, Wrapping SaveChanges with ON and OFF works fine with individual tables. But not in case of a parent-child relationship where a foreign key exists. Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot insert explicit value for identity column…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 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,865 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,962 questions
asked 2024-09-16T22:33:43.8366667+00:00
Joyce 100 Reputation points
edited a comment 2024-09-27T09:47:13.0733333+00:00
Joyce 100 Reputation points
1 answer

How to fix "The type initializer for 'WinRT.ActivationFactory1' threw an exception."

Hi there, I'm developing a mobile application with Net.MAUI, using SQLite db, EntityFrameworkCore, Net8, and I'm not able to create Migrations to manage db schema, using the following command in the Package Manager Console: Add-Migration INIT -o…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,540 questions
asked 2024-09-20T10:38:21.5566667+00:00
Ubaldo Zambelli 0 Reputation points
commented 2024-09-25T07:22:41.2766667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 43,371 Reputation points Microsoft Vendor
0 answers

Passing ViewModel with Dictionary properties to View throws NullReferenceException

I have a ViewModel that includes two Dictionary properties, Genres and Producers, which I want to send to the View. However, when I try to loop through the Dictionary properties in the View, I get a NullReferenceException error. The data appears to be…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,494 questions
asked 2024-09-24T03:31:58.87+00:00
Emmanuel Campos 0 Reputation points
commented 2024-09-25T04:21:59.0933333+00:00
JasonPan - MSFT 5,796 Reputation points Microsoft Vendor
3 answers One of the answers was accepted by the question author.

How to Update-Database in PM console when getting "Could not load assembly..." error?

Hello, I cannot apply migrations to database by Package Manager Console command Update-Database. On every attempt I get error: Could not load assembly "My_Project". Ensure it is referenced by the startup project 'My_Project'. Before mentioned…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 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,865 questions
asked 2024-09-13T13:56:24.9266667+00:00
Filip Veselý 20 Reputation points
edited the question 2024-09-25T03:15:06.13+00:00
Jack J Jun 24,506 Reputation points Microsoft Vendor
2 answers

How to get current User outside of Controller in another layer

In ASP.NET Core 6, I need to get the current user in service layer This is code: public class ServiceModel { private readonly IHttpContextAccessor accessor; public ServiceModel(IHttpContextAccessor accessor) { this.accessor =…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,877 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 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,962 questions
asked 2024-09-18T22:15:23.81+00:00
mostafa ahmed 41 Reputation points
answered 2024-09-19T17:41:23.7666667+00:00
Bruce (SqlWork.com) 65,576 Reputation points
1 answer

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

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2024-09-16T16:17:42.4466667+00:00
PocketPixie 6 Reputation points
edited a comment 2024-09-18T16:05:06.05+00:00
PocketPixie 6 Reputation points
1 answer

Scaffolding (DB first) does not generate Model class

Hi I tried to generate model class based on existing view. This is the command I used in PMC: Scaffold-DbContext "//connectionstring" Oracle.EntityFrameworkCore -schema //schema -table //table -OutputDir Models It seems like it is working.…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
asked 2024-09-17T03:18:53.1433333+00:00
Jia soon Loo 0 Reputation points
answered 2024-09-17T03:23:36.4366667+00:00
Jia soon Loo 0 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.
743 questions
asked 2024-04-05T22:58:14.0533333+00:00
Vatai Domonkos 15 Reputation points
commented 2024-08-31T14:06:02.36+00:00
K D 0 Reputation points
2 answers One of the answers was accepted by the question author.

Upload Image to ASP.NET Razor Page

Hello, How to add image upload in asp.net core razor pages to a Create and Edit page that is generated from: Add > New Scaffolded Item > Razor Pages using Entity Framework (KRUD) to save the name of image to database and upload image file to…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 questions
asked 2022-04-10T11:23:01.863+00:00
Yusuf 791 Reputation points
commented 2024-08-28T04:48:17.33+00:00
samantak 0 Reputation points
2 answers

How can I post multiple entries at once, when selecting multiple options from a Multi List Dropdown

Hi All, I have hit a bit of a snag with this. I have a form, which contains a multi select dropdown menu. I want to allow the user to select as many options from the drop down menu and upon pressing submit, each different item selected will be saved into…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,877 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 questions
asked 2024-01-10T14:48:48.12+00:00
John Rowan 1 Reputation point
commented 2024-08-28T03:32:30.3766667+00:00
Nkosi Alexander 0 Reputation points