743 questions with Entity Framework Core tags

Sort by: Updated
1 answer

I am unable to scaffold an API Controller with CRUD using DBContext in Visual Studio 2019 ver 16.xx

When I select the option to add an API Controller. I get an error saying "There was an error running the selected Code Generator. Package restore failed. Rolling back changes for the project xxx" I have tried to add the Entity Framework…

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 2021-05-01T18:29:23.777+00:00
Siddharth Seth 1 Reputation point
answered 2021-05-03T00:01:34.177+00:00
Duane Arnold 3,211 Reputation points
1 answer

Entityframework Core, combine to database fields into model value.

Using entity framework core, doing custom model building code first, I want to store a system.numerics Vector2 in SQL server. In the database I represent the value as two distinct fields, 'ValueX' & 'ValueY'. How can I configure the entity in EF such…

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 2021-05-02T22:16:22.783+00:00
Enterprise Complex 1 Reputation point
answered 2021-05-02T23:54:23.76+00:00
Duane Arnold 3,211 Reputation points
1 answer

Related table data not saved on call to SaveChangesAsync

I have these entities in my C# application: public class Balance1 : IAnalyticsSection { public int Id { get; set; } public Guid DataFileId { get; set; } public string Side { get; set; } public decimal AverageHeadSway { get; set; } …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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 2021-05-01T13:03:24.443+00:00
paul carron 1 Reputation point
commented 2021-05-01T19:06:40.45+00:00
Duane Arnold 3,211 Reputation points
3 answers

Entity framework code convert to sql

Hi, I have to convert my ef code to sql, but i have some problems to accomplish this task, What can be the best ways to retrieve a query from entity framework ? Thanks

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 2021-04-27T10:17:42+00:00
first100 81 Reputation points
answered 2021-04-28T02:54:24.297+00:00
Daniel Zhang-MSFT 9,626 Reputation points
3 answers

Code First Migrations - Package Manager Console Host Version 5.9.1.0

Need your expertise. Please advise. There's old table which already released to Production. It's already migrated and had related 2 recorded on the list of migrations ~IRM.SIMSDB\Migrations. In recent, we want to make four changes on this table.…

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 2021-04-18T20:35:35.577+00:00
Joann Liao 21 Reputation points
commented 2021-04-20T20:45:30.35+00:00
Duane Arnold 3,211 Reputation points
4 answers One of the answers was accepted by the question author.

Does package microsoft.entityframeworkcore.sqlserver work with xamarin.forms?

I am getting an error when trying to connect. I am only testing with the xamarin.ios project. I realize that connecting to a sql database over the internet is not a good idea. However, in my case the application connects only to a local database on a…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,357 questions
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 2020-11-27T23:04:26.477+00:00
Kurt K 136 Reputation points
commented 2021-04-18T01:51:52.777+00:00
Kurt K 136 Reputation points
1 answer

Order of SQL CRUD operations in Entity Framework Core

Many people have asked this question, but I am referring to something different. I have a table that stores facts. And this table contains the below columns. CREATE TABLE [dbo].[XTABLE] ( [identity] nvarchar(50) not null [seq] int not null…

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 2021-04-14T14:30:08.76+00:00
George Parissis 1 Reputation point
commented 2021-04-16T02:33:58.94+00:00
Daniel Zhang-MSFT 9,626 Reputation points
1 answer

How to configure Serverless Azure SQL for Multiple ASP.NET Core web sites with EF Core

I'm planning on hosting single instances of multiple (two for starters) ASP.NET/EF Core Web Sites in Azure Kubernetes and they need databases for persistence. These websites will be code first and not share any data structures. All of these sites will…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
Azure SQL Database
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
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,892 questions
asked 2021-04-10T21:59:39.36+00:00
Siegfried Heintze 1,886 Reputation points
commented 2021-04-16T00:45:32.057+00:00
Navtej Singh Saini 4,226 Reputation points Microsoft Employee
1 answer

GPU based database provider for Entity Framework Core 5 and beyond.

For a wicked fast database, is there any plans for a Entity Framework Core 5 ~ 6 provider to any of the in memory GPU databases that are out or that are coming out? I have seen an example of Rapids Dask on a NVidia A6000 and it seems like a much better…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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 2021-03-28T13:38:46.413+00:00
SuperDave 1 Reputation point
answered 2021-03-29T07:02:58.09+00:00
Daniel Zhang-MSFT 9,626 Reputation points
0 answers

Setup failed when installing .NET Core SDK 3.1.407 and some others in Windows 10 Home | Error code: 0x80070659

Hi! I am trying to install .NET Core SDK 3.1.407, .NET SDK 5.0.201 and Microsoft Windows Desktop Runtime - 3.1.13 (x64) but the setup is always returning the same error code (0x80070659). I dont know what to do, im the owner of the device (i have…

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 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,163 questions
Windows 10 Compatibility
Windows 10 Compatibility
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Compatibility: The extent to which hardware or software adheres to an accepted standard.
480 questions
Windows 10 Setup
Windows 10 Setup
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,945 questions
asked 2021-03-25T01:42:17.287+00:00
Dante M. Leyva 1 Reputation point Microsoft Intern
commented 2021-03-26T03:27:18.3+00:00
Jerry Cai-MSFT 991 Reputation points
0 answers

Not able to reference Xamarin.Android to class library project with .net 5

Hi, I am receiving following error while adding reference to Class Library Project from android project a and ios project. Severity Code Description Project File Line Suppression State Error Project '..\DeliveriesApp\DeliveriesApp.csproj' targets…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,357 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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 2021-03-22T13:06:43.113+00:00
sheeja varghese 21 Reputation points
commented 2021-03-23T07:29:52.303+00:00
JessieZhang-MSFT 7,711 Reputation points Microsoft Vendor
0 answers

AutoMigration : can't ALTER table or column name error

I have some issued in auto-migration approach which is given by M.S. Docs (link is below): https://zcusa.951200.xyz/en-us/ef/core/managing-schemas/migrations/applying?tabs=dotnet-core-cli ( My Code ) var host =…

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
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
534 questions
asked 2021-03-22T10:44:15.787+00:00
JaySoni 1910 6 Reputation points
commented 2021-03-23T05:41:39.497+00:00
Daniel Zhang-MSFT 9,626 Reputation points
1 answer

Entity Framework Core 5.0 scaffold-dbcontext hangs within Package Manager

I have created my first scaffold-dbcontext command and run it in Package Manager Console in Visual Studio 16.6.2. After 'Build succeeded.' the PM just hangs. I can do nothing except restart Visual Studio to get PM back. When I re-open the project the…

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 2021-03-17T10:45:51.13+00:00
Jim Thomas 41 Reputation points
commented 2021-03-22T06:35:16.14+00:00
Daniel Zhang-MSFT 9,626 Reputation points
1 answer

How to do AutoMigration in Entityframework core without using command (Using Programming only)

I use EF core in My project and I want migrate my context using Programming (not command) So I use these two concpets one by one 1. using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { …

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 Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
534 questions
asked 2021-03-18T12:43:17.46+00:00
JaySoni 1910 6 Reputation points
answered 2021-03-19T05:47:53.237+00:00
Michael Wang-MSFT 1,061 Reputation points
0 answers

Entity Framework Core Tool doesn't work from dotnet tool

Hello ! I've encoutered an issue using EntityFrameworkCoreTool 5.0.4 : When I install the nuget package and run a scafold command from the package manager console, it works fine. But when I install it as a dotnet tool using dotnet tool install dotnet-ef…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 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 2021-03-12T10:05:48.23+00:00
Guillaume Gayot 1 Reputation point
commented 2021-03-18T08:52:11.63+00:00
Daniel Zhang-MSFT 9,626 Reputation points
1 answer

About.core3.1 Dynamic Compiling

Hi, I was compiling some code dynamically with Core3.1 and was told that the platform didn't support it, but using the Framework was fine.I don't know how to return a responsibility, ask everybody to help using RRQMSocket; using RRQMSocket.RPC; …

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 2021-03-17T14:50:13.483+00:00
若汝棋茗 41 Reputation points
answered 2021-03-18T02:41:34.373+00:00
Daniel Zhang-MSFT 9,626 Reputation points
1 answer

Ef Core - weird behavior of AddRange

Here's my code: [Table("prom_term", Schema = "demo")] public class PromTerm { [Key] [Column("promotion_terminal_id")] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int…

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 2021-03-12T20:27:35.6+00:00
senglory 1 Reputation point
commented 2021-03-16T09:54:05.623+00:00
senglory 1 Reputation point
1 answer

Why .NET Security Updates for x64 Windows Server includes many other packages including ones for Desktop systems and x86 systems

Hello, I'm curious how one is suppose to determine which of these packages in the update shown below is supposed to be installed when downloading from the MS Update Catalog? If you are running a Server OS (say 2016 Datacenter x64) and that server has…

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 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,163 questions
asked 2021-03-12T19:18:32.903+00:00
ComputerUser_88633 21 Reputation points
answered 2021-03-16T06:23:32.12+00:00
abbodi86 3,891 Reputation points
1 answer

SQL Server and EF Core, create “Lock Request Timeout” error

(I asked this on StackOverflow as well, figured I'd throw it out here too) I recently had my EF Core (2.1) code throw a DbUpdateException, caused by a lock request timeout. I think I understand the basic idea behind this (EF doesn't lock items until it…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
743 questions
Azure SQL Database
asked 2021-03-11T00:20:33.53+00:00
Bill Turner 1 Reputation point
commented 2021-03-15T14:28:40.56+00:00
Navtej Singh Saini 4,226 Reputation points Microsoft Employee
2 answers One of the answers was accepted by the question author.

EF Core add new record, assigned identity when life cycle is scoped

Hi In asp.net core 3.0 app with ef core 3.18, dbcontext registered AsScoped, when a new record created with identity set as integer and incremental, and automatic number identity value is assigned to that entity record, say 1, if at the same time in…

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 2021-02-28T17:21:14.217+00:00
babak fakhriloo 41 Reputation points
accepted 2021-03-10T16:38:46.197+00:00
babak fakhriloo 41 Reputation points