Microsoft Q&A

Entity Framework Core

420 questions

A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.

Browse all .NET tags

420 questions with Entity Framework Core tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

Entity Framework Core 5 doesnt support Oracle 10G?

I'm trying to create a Model from my database Oracle(10g) using Scaffold-DbContext. Scaffold-DbContext "DATA SOURCE=XPERTISE.world;PASSWORD=XXX;USER ID=SCHEDULE" Oracle.EntityFrameworkCore -OutputDir Models -Tables MEETINGS -Force. Im…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-02-27T11:14:01.423+00:00
oscar rodriguez urbina 21 Reputation points
commented 2021-03-01T16:54:29.977+00:00
oscar rodriguez urbina 21 Reputation points
0 answers

EntityFramework Any in Where

Hello, when i try to use Any in EF Core where, i get an error. can you help? query: var identifierslist = new List<DeviceIdentifierModel>(){..identifiers here...}; var devices = await _context.Device.AsNoTracking() …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-02-18T11:06:17.587+00:00
Selçuk Yıldırım 1 Reputation point
commented 2021-02-22T08:27:35.057+00:00
Daniel Zhang-MSFT 9,471 Reputation points
2 answers One of the answers was accepted by the question author.

Update entities all at once

I have a list of entities returned me from external service, in this list i would take only item with flag IsNew setted to true and save in my database. My code is: var entitiesLst =ExternalService("BoxIt"); foreach (var…

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.
6,923 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-02-17T16:17:53.6+00:00
first100 61 Reputation points
accepted 2021-02-18T12:10:38.767+00:00
first100 61 Reputation points
1 answer One of the answers was accepted by the question author.

Very slow database creation within Azure function project deployed to Premium plan

Something I have discovered whilst investigating some performance issues is that it is taking entity framework between 6 and 7 seconds to perform the first database operation (the database has 152 tables) when deployed into an Azure Premium Function…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,577 questions
asked 2021-02-12T13:54:29.103+00:00
Andrew HB 316 Reputation points
accepted 2021-02-12T14:46:59.307+00:00
Andrew HB 316 Reputation points
1 answer One of the answers was accepted by the question author.

set variable of partial class

I have a generated clas (with soapui) I need to pas data to a class order This class has partial classes The code : This is what i try and th error i get .... Dim orders(1) As dpd_label.order orders(1) =…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
954 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,827 questions
.NET Standard
.NET Standard
A formal specification of .NET APIs that are available on multiple .NET implementations.
482 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,175 questions
asked 2021-02-06T21:57:43.177+00:00
stoffel79 21 Reputation points
accepted 2021-02-07T20:13:27.063+00:00
stoffel79 21 Reputation points
1 answer

Passing multiple Lists in single parameter

Hi Team I have below requirement. ' There are 3 list with different class type. Example: List<Customer> lst1=new LIst<Customer>(); List<CustomerOrder> lst2=new List<CustomerOredr>(); List<CustomerTransaction>…

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.
6,923 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-02-05T12:37:27.297+00:00
prasad k 86 Reputation points
answered 2021-02-05T16:08:22.58+00:00
Duane Arnold 3,211 Reputation points
1 answer One of the answers was accepted by the question author.

Sample code Asp.Net Core Datatables Jquery pagination MVVM Services

Hi, I would like a template sample code to get started, with Asp.Net Core CRUD operations with search pagination , master detail pages. Dependency Injection CODE FIRST ENTITY Framework Datatables Jquery I have a solution developed on…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-01-29T07:41:29.96+00:00
murtaza gandhi 81 Reputation points
accepted 2021-02-01T07:43:39.617+00:00
murtaza gandhi 81 Reputation points
1 answer

EF Core 5 many-to-many disconected add/remove without join entity class

EF Core 5 introduced many-to-many by convention, we only need to add the collection navigation property on each side and it works. I know I can query one side of the relationship, add it to the collection property and save it, but this requires an…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-01-30T09:27:12.827+00:00
Diego Torres 1 Reputation point
answered 2021-02-01T06:13:50.197+00:00
Daniel Zhang-MSFT 9,471 Reputation points
2 answers

Receiving chat messages with SignalR

I tested the SignalR solution in Xamarin Forms and .net core backend and it works great: https://montemagno.com/real-time-communication-for-mobile-with-signalr/ However, I am wondering how to keep receiving the messages when the app is in background…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,804 questions
asked 2021-01-23T01:29:59.907+00:00
Stesvis 1,016 Reputation points
commented 2021-01-30T03:16:35.06+00:00
TheSloth 1 Reputation point
1 answer

EF Core question regarding relations

I'm building a ticket system. I have two models: User and Ticket. A user can have multiple tickets, and is bound to the ticket via the Customer_Id field. Another user, with the role of Practitioner, can also be assigned to the ticket, via the…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-01-20T08:21:36.483+00:00
commented 2021-01-26T02:34:04.33+00:00
Daniel Zhang-MSFT 9,471 Reputation points
1 answer

Where to store xamarin forms chat messages

Hi, I need to implement a chat service in my app. Before I get too far on this, I would like to ask for an opinion on where to store chat messages. My options so far are: Twilio chat My own DB There are pros and cons, Twilio chat costs…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,804 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-01-22T16:31:46.813+00:00
Stesvis 1,016 Reputation points
answered 2021-01-22T16:37:29.997+00:00
Alessandro Caliaro 2,796 Reputation points
1 answer

Creating a generic template in C#

I have researched that C#, as well as its predecessor, C++, enable users to create generic templates. Here are the two source code snippets below: using System; using System.Collections.Generic; using System.Data.OleDb; using System.IO; namespace…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 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.
6,923 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
954 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,316 questions
asked 2021-01-20T06:12:29.877+00:00
JohnCTX 621 Reputation points
commented 2021-01-20T08:20:54.047+00:00
Daniel Zhang-MSFT 9,471 Reputation points
0 answers

Error adding migrations: Failed to create CoreCLR, HRESULT: 0x80070057

I'm having an issue whereby I get the error message: Failed to create CoreCLR, HRESULT: 0x80070057 when I use any of the entity framework tooling. I have 2 projects in my solution an ASP.NET Core (.NET 5) Web API and a .NET Standard 2.0 Class Library. …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 questions
asked 2021-01-16T04:14:20.537+00:00
SoggyBottomBoy 6 Reputation points
commented 2021-01-20T08:06:46.907+00:00
Rena Ni - MSFT 1,526 Reputation points Microsoft Employee
0 answers

Spatial data operations

Hello, I have to migrate some routines written in VBNET in WPF environment on AZURE (webapi net core). In these routines spatial operations such as union, intersection, etc. take place. here is an example: Private Sub example(ByVal sender…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,531 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
954 questions
asked 2021-01-14T10:50:45.65+00:00
Marco Salvatori 191 Reputation points
1 answer

AddDbContext<TContextService, TContextImplementation> don't use DI to create the db

In my project I have created this DbContext derived class: public class SqliteContext : DbContext, IRepoContext { private readonly string _fullname; public SqliteContext() { _fullname = SqliteHelpers.CreateDbFullName(); } …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2021-01-07T10:45:45.907+00:00
Marco Segurini 21 Reputation points
commented 2021-01-12T09:05:32.047+00:00
Daniel Zhang-MSFT 9,471 Reputation points
2 answers

Linq Error when migrate entityframeworkcore 2.2 to 3.0

Hello, i am migrating from netcore 2.1 to 3.1. of a solution hosted on Azure. I have encountered many errors due to entityframeworkcore 3. Queries such as DBe.BmsListaInfrastructure.Where (e => e.Amministration == Administration) .ToList (); …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2020-12-15T18:27:20.663+00:00
Marco Salvatori 191 Reputation points
answered 2020-12-17T14:25:01.817+00:00
Marco Salvatori 191 Reputation points
4 answers One of the answers was accepted by the question author.

How to pass datatable from c# class to MSSQL Server stored procedure using Entity Framework Core 5.0.1.

I have a data import application written in .Net Framework to migrate to .Net Core. The application uses a c# class to pass a datatable as an input parameter to a MSSQL server stored procedure. The code in EF6 works fine and is pasted below. …

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2020-12-10T12:53:30.587+00:00
Williamson, Stephen 21 Reputation points
accepted 2020-12-14T15:19:11.56+00:00
Williamson, Stephen 21 Reputation points
2 answers

Code first Unique constraint on multiple columns

Say I want a Microsoft SQL Server entity as follows: CREATE TABLE [dbo].[Entity]( [ID] [int] IDENTITY(1,1) NOT NULL, [COL1] [nvarchar] NOT NULL, [COL2] [nvarchar] NULL, [COL3] [nvarchar] NULL, CONSTRAINT [PK_Entity] PRIMARY KEY CLUSTERED Then…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2020-12-06T17:22:22.337+00:00
EuroEager2008 91 Reputation points
commented 2020-12-10T08:00:42.027+00:00
Daniel Zhang-MSFT 9,471 Reputation points
1 answer One of the answers was accepted by the question author.

DbContext lifetime in desktop app with SQLite

I am creating a small data-driven desktop application using .NET 5 with WPF, ReactiveUI, Dynamic Data, and EF Core 5. The app uses a local SQLite database to store all persisted state, and relies heavily on dependency injection. I would like to share…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 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,173 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.
8,472 questions
asked 2020-12-04T01:26:51.93+00:00
mtrainham 21 Reputation points
accepted 2020-12-04T18:28:49.253+00:00
mtrainham 21 Reputation points
1 answer One of the answers was accepted by the question author.

Having trouble with foreign key in entity, can't track because the FK is already part of another object

Scenario: I have an entity that is central to the business, let's call it Company. Entity Foo has FK CompanyID, as does entity Bar. If, within the same context, I retrieve Foo and create an instance of Bar, then try…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
420 questions
asked 2020-12-01T00:34:30.12+00:00
David Craig 31 Reputation points
commented 2020-12-02T01:17:45.293+00:00
Daniel Zhang-MSFT 9,471 Reputation points