696 questions with Entity Framework Core tags

Sort by: Updated
1 answer

azure entity framework: new table is not created, internal server error when trying to insert data

i am stuck here for days now: all i want is to create a table called useritems and upload data into it, this is my middleware: [Route("tables/useritem")] public class tblUserController : TableController<UserItem> { public…

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 2022-11-28T11:38:26.807+00:00
inno 1 Reputation point
answered 2022-11-28T14:55:37.973+00:00
AgaveJoe 26,136 Reputation points
1 answer

Getting invalid foreign key constraint error when running database update

I understand what the error means, and I can edit the migration for the specific foreign keys to set Delete Action to NoAction... However, I shouldn't be getting this error. As you can see in the discussion below, Angela was able to create my exact…

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,188 questions
asked 2022-11-27T06:08:31.54+00:00
Jake Ford 1 Reputation point
answered 2022-11-28T02:02:05.65+00:00
Zhi Lv - MSFT 32,016 Reputation points Microsoft Vendor
0 answers

How to migrate from entity frame work 6 to ef 7 i upgraded to ef 7 but not getting the latest features i an using repository pattern

How to migrate from entity frame work 6 to ef 7 i upgraded to ef 7 but not getting the latest features i an using repository pattern i have update to dotnet 7 and ef 7 but nothing helped

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,277 questions
asked 2022-11-24T05:00:33.777+00:00
Divyansh Kumar Singh 1 Reputation point
commented 2022-11-25T05:53:21.117+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor
1 answer

Joint multiple table entitiframework code first in .netcore 6 using models

I am new to entityframework code first approach. i am using .net core 6 .I want to develope doctors patient appointment project. So i am creating 3 enties. 1) Patient entity - Keeping patient Information 2) Staff entity- Keeping Doctors information…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,277 questions
asked 2022-11-11T05:56:40.753+00:00
Binumon George 161 Reputation points
commented 2022-11-24T07:23:39.95+00:00
Jack J Jun 24,296 Reputation points Microsoft Vendor
2 answers

Entity Framework Core SELECT from EF3

I have an EF 3 LINQ Query that I'm trying to translate to EF CORE and it's not working. Can anyone help and point me to a good EF CORE documentation? We've upgraded a .NET 3 WebAPI EF 3 to .NET 6 using EF CORE and it's becoming a nightmare. My…

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,188 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,277 questions
asked 2022-11-22T15:33:23.843+00:00
Cloud Developer 1 Reputation point
answered 2022-11-22T17:19:17.833+00:00
AgaveJoe 26,136 Reputation points
1 answer One of the answers was accepted by the question author.

how to save two tables linked by one to several simultaneously

for example Car and Simultaneous Image by first recovering the primary key of the car and assigning to the different images in a single Linq c# request

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,277 questions
asked 2022-11-09T14:26:29.6+00:00
Nakashi Learn 21 Reputation points
commented 2022-11-14T08:22:34.507+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor
1 answer

Migrating EF6 to EF Core 6.0 - Properties in partial class

Hello, Properties added in partial classes are recognized with EF6. With EF Core 6.0, there is no error when compiling, but an error occurs when loading data, new properties are not recognized. As a workaround, we moved the new properties into a…

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 2022-11-10T10:21:33.603+00:00
Dominique Largey 1 Reputation point
commented 2022-11-11T08:24:59.727+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor
2 answers

Limiting columns in anEF Core Query

I'm using this method to return specific rows with specific columns from a SQL DB using EntityFramework Core Even with the ".Select(x => new Tbl016" expression I still get every single column in the table. Is there a way that I can…

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 2021-11-04T18:44:56.17+00:00
Mohammad Radawan 106 Reputation points
commented 2022-11-09T15:18:26.88+00:00
Muhammad Kamran Asim 1 Reputation point
1 answer

Configuration of entities to save summed values in database

Hi, I have two entity classes (Order, OrderItem) and one Value Object class (Money). Simplified code: public class Order { private Order() { } public int OrderId { get; private set; } public…

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 2022-11-04T08:45:54.013+00:00
lukaszjazwiec 1 Reputation point
answered 2022-11-09T08:12:02.247+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor
3 answers

Why isn't my WCF/WPF service working?

This is my structure and what I did: WCF add Entity Framework IService add [OperationContract] in IService1 create DTO classes for things I needed Service in Service1 create class variable "Entity entity= new…

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,396 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,676 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
asked 2022-09-10T08:37:21.763+00:00
Anonymous
answered 2022-11-08T06:56:45.673+00:00
ElChefe 76 Reputation points
0 answers

websecurity login not logged success althogth i have same user name and password on membership table ?

I working on c# web application i use the following code to login but it not logged success it show model state error although i have same user name and password on database so how to solve this issue please public JsonResult…

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,396 questions
asked 2022-11-04T15:35:01.383+00:00
ahmed salah 3,216 Reputation points
commented 2022-11-07T08:43:53.287+00:00
Zhi Lv - MSFT 32,016 Reputation points Microsoft Vendor
0 answers

Second value in dropdown list

<select class="form-select" asp-for="SpareParts.Item" asp-items="@(new SelectList(Model.Stocks,"ItemCode","ItemName"))"> <option value="">select...</option> </select>…

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,188 questions
asked 2022-11-01T11:29:20.07+00:00
Curious Cat 21 Reputation points
commented 2022-11-02T06:49:45.207+00:00
Zhi Lv - MSFT 32,016 Reputation points Microsoft Vendor
2 answers One of the answers was accepted by the question author.

LINQ Expression Could not Be Translated

Hello everyone and thanks for the help in advance. I am creating a MVC application uisng .Net 6 and EF 6 to query a database. One of the functions is needed to search a date of birth. However, when I attempt to use the following: persons =…

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
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
asked 2022-10-28T19:13:58.377+00:00
Kmcnet 696 Reputation points
commented 2022-11-01T19:56:52.457+00:00
Kmcnet 696 Reputation points
0 answers

Another strange problem...

I am entering data into a table. During this (In the OnPostAsync scope), I do send an query to an another table, to obtain a missing data that doesn't is included in the data which comes the from. But at each try i get a strange rendered result. …

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,188 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,272 questions
asked 2022-11-01T12:40:44.427+00:00
Curious Cat 21 Reputation points
commented 2022-11-01T14:56:03.983+00:00
AgaveJoe 26,136 Reputation points
1 answer

Entity Framework Core Migrations within an Agile Team

Hello everyone! I would like to get some advice on working with EFCORE 6 within an agile team. What is the best and common way of handling EFCORE migrations within teams? we need to make it easy to apply and rollback features that may involve…

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 2022-10-31T19:08:03.59+00:00
Ramy Gamal 1 Reputation point
answered 2022-11-01T05:46:30.577+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor
1 answer

SaveChangesAsync is not Working .Without SavechangesAsync Data inserted into Database

public async Task<Result<ReturnResult>> Handle(CreateDocumentTypeCommand request, CancellationToken cancellationToken) { var documentType =…

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,396 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,277 questions
asked 2022-10-19T10:29:36.073+00:00
Walidulhasan Boniamin 1 Reputation point
commented 2022-10-27T08:38:13.877+00:00
Jiale Xue - MSFT 33,686 Reputation points Microsoft Vendor
1 answer

Create database from entity framework codefirst approach in server

Hi All, We are developing. netcore6 Web API using entity framework code first approach. We planned to deploy it in windows azure. How to create and deploy databases on servers? Using MySQL as database. To deploy I published…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 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,277 questions
asked 2022-10-26T03:32:48.557+00:00
Binumon George 161 Reputation points
commented 2022-10-26T09:58:15.613+00:00
Karen Payne MVP 35,036 Reputation points
1 answer One of the answers was accepted by the question author.

EF6 Linq Navigation properties are always null

Here is the setup I have a product table public partial class Product { public uint Id {get; set;} public uint TypeId {get; set;} public virtual ProductType ProductTypeNavigation { 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.
696 questions
asked 2022-10-24T17:15:38.447+00:00
Jeff Vanhorn 21 Reputation points
accepted 2022-10-24T18:36:39.167+00:00
Jeff Vanhorn 21 Reputation points
1 answer One of the answers was accepted by the question author.

How to define foriegn key in my own classes.

Hi Folks, I am not sure if this is the right place to ask my question but it is somehow related to EF Core & Identity. I am using ASP.NET Core Identity in my project. I have added my own custom tables along with the tables created by Microsoft…

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,188 questions
asked 2021-10-10T13:37:07.36+00:00
Imran Jalali 101 Reputation points
commented 2022-10-21T13:44:46.233+00:00
Wong Ke Ryn 1 Reputation point
3 answers

Add new Table to DbContext

Hi friends thanks for any help. But I have injected a DbContext into my controller. Since then I have added a new table to the Database that I am using with my DbContext, so obviously in my controller I dont see the new Table as a Dbset in my DbContext.…

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 2022-10-10T00:56:24.717+00:00
Ronald Rex 101 Reputation points
answered 2022-10-19T07:13:27.693+00:00
Zhanglong Wu-MSFT 261 Reputation points Microsoft Vendor