ef-core-6.0 Questions

10

Solved

I have a DbContext named FileManagerContext in my DOTNET 6 API: public class FileManagerContext : DbContext { public FileManagerContext(DbContextOptions<FileManagerContext> options) : base(o...
Braunstein asked 2/2, 2022 at 15:30

3

Failed to create an editor. the parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Error Script-Migration -From "PreviousMigration" the Update Visual Studio Commu...

3

I am trying to install the latest Microsoft.EntityFrameworkCore 6.0.3 into a class library project targetting netstandard2.1 using Nuget Package Manager and I get this error: Package Microsoft.Ent...
Rabblerouser asked 11/3, 2022 at 20:29

2

Solved

Question: how to resolve this error: Microsoft.EntityFrameworkCore.DbUpdateException: Required properties '{'Prop1', 'Prop2'}' are missing for the instance of entity type 'SomeEntity' with the key...
Turne asked 5/1, 2022 at 19:37

2

Solved

The below LINQ query works perfectly fine in EF6 world where the whole query seems to be evaluated at the server (checked with SQL Profiler) but fails in EFCore6. private IQueryable<CommentRespo...

4

I was creating a database table in Entity Framework Core 6.0. I was using code first approach in my project. There was a string type property in TestModel named Address. using System.ComponentMode...

2

Solved

I've created a new project using .NET 6 and EF Core 6 but when I try to create a migration using dotnet ef migrations add, the CLI begins running the application after "Build succeeded."....

2

Solved

Let's assume I have multiple db tables, I'll just represent them as lists for convenience: EntitySource { public int Id {get; set;} public ICollection<Entity_1> table_1 { get; set } public...
Marillin asked 8/7, 2022 at 8:3

2

I've been tasked with figuring out the impact of enabling temporal tables in our database. So I've been looking for a feature to enabling it to the entire database, and not just with: protected ove...
Spindling asked 25/8, 2022 at 13:48

1

Solved

Basically I want to create an inner or join. In SQL: SELECT COUNT(*) FROM Discounts JOIN DiscountArticles ON Discounts.ID = DiscountArticles.Discount JOIN Articles ON (DiscountArticles.Article = Ar...
Elliellicott asked 22/11, 2022 at 11:12

1

I have installed dot net in my Mac and by mistake I updated the dotnet EF tools to the latest version (7.0.0). I need to revert back to the previous version (6.0.11). As far as I read it, it was su...
Forgery asked 9/11, 2022 at 5:8

1

Solved

This question has been posted multiple times before but the answers no longer appear to match the method signatures available in the latest NuGet packages. After spending days trying to piece toget...

1

Solved

I have two entities with a relationship without a key, when I want to edit the personnel code field in Personnel, this error is displayed to me. 'The property 'Personnel.PersonnelCode' is part of a...
Polybius asked 13/9, 2022 at 14:11

3

Solved

I have strange behavior with EF Core tools in developer PowerShell in VS2019. After creating migration with this command: dotnet ef migrations add VisibleLink -p .\src\Only.Portal.Data\ -s .\src\On...

1

I have a piece of code in EF Core that looks like this: var queryPart1 = from table1 in context.Table1 select table1.ColA; var queryPart2 = from table2 in context.Table2 select table2.ColX; var...

2

Solved

I am receiving the following warning: No store type was specified for the decimal property 'PurchasePrice' on entity type 'ProductStatisticsKeylessEntity'. This will cause values to be silently tr...
Mountford asked 9/12, 2021 at 10:59

1

Solved

We have a fairly simple situation where an EF Core entity contains a value object that we map to a string: builder.Property(_ => _.Nummer) .HasConversion(i => i.ToString(), i => ZijdeNumm...
Sumner asked 1/4, 2022 at 8:50

3

I am already using transactions inside my repository functions in some cases because I sometimes need to insert data into two tables at once and I want the whole operation to fail if one of the ins...
Omophagia asked 2/2, 2022 at 15:50

1

In a SQL Server database, I have two almost identical tables TBL_1 and TBL_2. Here are the create scripts for both tables: TBL_1: CREATE TABLE [dbo].[TBL_1]( [ID] [int] IDENTITY(1,1) NOT NULL, [n...
Terrell asked 9/3, 2022 at 10:0

0

I'm trying to implement Temporal Normal Form using Entity Framework Core. Consider having following entity: public class Employee { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public in...
Dentiform asked 19/1, 2022 at 9:49

0

While working on migration from .net5 to .net6 I came across a problem with Entity Framework (running against SqlServer database) AppDbContext context = _provider.GetRequiredService<AppDbContext...
Spiry asked 20/12, 2021 at 14:15

2

Solved

I have a Blazor Web Application that has been working and in the field for a few months. I want to extend the DB querying to the group of similar "Detections". It was written starting wit...
Elvinaelvira asked 17/11, 2021 at 4:22
1

© 2022 - 2024 — McMap. All rights reserved.