780 questions with Developer technologies | .NET | Entity Framework Core tags
Working on a SharePoint Add-in and would use to like Entiry Framework core
Has anyone added Entity Framework core to a SharePoint Add in? If yes, could someone point me to a set of steps?
Developer technologies | .NET | Entity Framework Core
Microsoft 365 and Office | SharePoint | Development

How to give script for production when working with Entity Framework corre
Hi I was working in an environment where we would update the database script for database schema or read-only data in the script, or would use the SQL Project to create the script so that script can be given to update the database in production or to…
Developer technologies | .NET | Entity Framework Core
Using PaginatedList with ViewModel (ASP.NET Core 5.0, C#, EntityFramework)
I'm creating a Frequently Asked Questions web application. I followed Microsoft's tutorial for adding sorting, filtering, and paging to an ASP.NET MVC EF Core application, using the PaginatedList: …
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | ASP.NET | Other
Error when creating Database using Entity Framework Core
I am getting the error bellow when I try to create my database using Entity Framework Core: Introducing FOREIGN KEY constraint 'FK_StudentAnnouncements_Students_StudentId' on table 'StudentAnnouncements' may cause cycles or multiple cascade paths.…
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core

EF Core 5.0.X - made changes to db now how to update dbcontext?
I have a dbcontext that was a result of scaffolding, now I need to make changes to the db such as adding relationships and deleting some others. How can I force EF Core to pick up on these changes, but leave everything else untouched?
Developer technologies | .NET | Entity Framework Core

'EntityFramework.Core.Tools' nuget package installation error: "The process cannot access the file ef.exe because it is being used by another process"
While installing the package Microsoft.EntityFrameworkCore.Tools for using EF in my project using Nuget, I'm persistently running into the below error. Notice I didn't get any error while installing other related packages used for EF core. …
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core
Developer technologies | .NET | .NET Runtime
Developer technologies | .NET | Other


Add data to new table in One-to-Many relationship using Entity Framework Core
I am trying to build a simple example where I have Projects, each project will have own time schedule, time schedule will consist of tasks. Currently I have built my interface so that user is able to add new Project to ComboBox. Then by selecting project…
Developer technologies | .NET | Entity Framework Core
Developer technologies | Windows Presentation Foundation
Developer technologies | XAML
Developer technologies | C#
EF Core related entities only returns one record in a one-to-many relationship
I have an app that lists Computers in a domain. Each computer has a one-to-many relationship to an Applications table. I am able to pull the Computer details, but when I map try to pull the Applications associated with the computer I only get one…
Developer technologies | .NET | Entity Framework Core
HTTP POST many to many ef core 5.0
I am an application (web API core ) I have three tables (many to many). Tables Name: • Book (BookId, Name) • Category (CategoryId, CategoryName) • BookCategory (BookId, CategoryId) I am trying to create an HTTP POST endpoint for many to many…
Developer technologies | .NET | Entity Framework Core
Developer technologies | ASP.NET | ASP.NET Core

EF Core 3.1.15 Keyless Entity Unexpected Results When Using Navigation Properties
I am having trouble querying a view that joins two tables that have a one to many relationship. I have a keyless entity mapped to the view that contains navigation property for the principal table. When I include the principal entity and then include the…
Developer technologies | .NET | Entity Framework Core
dynamic order by different column and table
Hello All, we are trying to add dynamic Order by different column in multiple tables. we will get column name and have to sort data. for example I want sort Department.Name or Staff=> JoiningDate . I tried different options and didn't work. not…
Developer technologies | .NET | Entity Framework Core
EF Core - Value Conversions based on a database column value
Hi All, I need to encrypt some sensitive database columns while saving them to database and need to decrypt while reading them back from database. We are using EF core in our project. I plan to use EF Core - Value conversions as explained here…
Developer technologies | .NET | Entity Framework Core
Decrypt data from the database
Hello, Based on this article you learn about how to encrypt data but there is an important part about decryption.. How do you decrypt data from the database based on this article? …
Developer technologies | .NET | Entity Framework Core
Updating subtables adds records rather than amending existing records
I have these two models: public class Balance1 : IAnalyticsSection { public int Id { get; set; } public Guid DataFileId { get; set; } public string Side { get; set; } public decimal AverageHSway { get; set; } public decimal…
Developer technologies | .NET | Entity Framework Core
Developer technologies | C#
How to combine one-to-many relationship and many-to-many relationship in Entity Framework Core
My requirement is design a system that: Allow a user to create a post, tag one or more other users in post. So I tried to create 3 classes of entities as below: public class User { public int Id { get; set; } public string Username…
Developer technologies | .NET | Entity Framework Core
Developer technologies | C#
EF Core 3.1.14 Recurring Cold Start
We have deployed a very simple .NET CORE 3 Web API application to Azure Cloud. The application is a web api and talks to a very simple SQL server database hosted in Azure as well. There are two main performance problems we are noticing All API calls…
Developer technologies | .NET | Entity Framework Core
Azure SQL Database
How to populate a table correctly using Entity framework
I've been given this code: var innerBalance1File = await innerContext.Balance1.SingleOrDefaultAsync(x => x.DataFileId == dataFile.Id); Balance1Class balance1Class = new Balance1Class(); if (innerBalance1File == null) { innerBalance1File = new…
Developer technologies | .NET | Entity Framework Core
Developer technologies | C#

Entity Framework Core with SQLite: How to include records from multiple related tables without hyperinflating temporary files?
My application works with the historical stock data. When new data needs to be added for a stock or some records need to be updated, I load stock-related data using the following function: public Stock GetStockWithData(string symbol) { return …
Developer technologies | .NET | Entity Framework Core
SQL Server | Other

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…
Developer technologies | .NET | Entity Framework Core

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…
Developer technologies | .NET | Entity Framework Core
