ef-core-5.0 Questions

3

I suppose I have the two entities with many to many relationships, and i am going to use fluent api to resolve this relationship public class Author { public int AuthorId { get; set; } public str...
Coloring asked 30/11, 2020 at 18:53

1

I am trying to scaffold views based on a ViewModel in ASP.NET Core 5 project and have been finding it difficult passing through the following stage I used to be able to pass this stage by deleting...

4

Solved

I have many test classes, and each has dozens of tests. I want to isolate tests, so instead of a mega context MyDbContext, I use MyDbContextToTestFoo, MyDbContextToTestBar, MyDbContextToTestBaz, et...

4

Solved

I'm trying to use the new DbContextFactory pattern discussed in the DbContext configuration section of the EF Core docs. I've got the DbContextFactory up and running successfully in my Blazor app, ...

4

Solved

There are these two entities: public class Employee { public int Id { get; set; } public string Name { get; set; } public CompanyVehicle CompanyVehicle { get; set; } } and public class CompanyV...
Gap asked 24/7, 2021 at 7:29

2

Solved

We're using EF Core within a context where we always manage the transaction externally. We also have to use MARS. This combination causes the following warning since we've upgraded to EF Core 5: Mi...
Waterfront asked 1/2, 2021 at 9:56

1

Solved

I'm using the "Create and Drop" APIs since my model changes often. After a model change, I call dotnet ef database drop, and on next run the system calls context.Database.EnsureCreated() ...
Slavonic asked 10/11, 2021 at 3:26

4

I'm updating an EF6.x project to EF Core 3.1. Decided to go back to basics and follow the example of how to set up relationships from scratch again. According to the official Microsoft documentatio...
Graphy asked 20/1, 2020 at 10:38

1

Solved

I want to turn off ALL (or at least most of) conventions in Entity Framework Core (and I am talking about EF Core 5 or above) and then build the whole model "by hands". One may wonder why...
Maryellen asked 29/5, 2021 at 0:10

1

Solved

I added an entity class to my EF Core 5.0/MS SQL Server data model that is backed by a defining query (raw SQL query, with no table or view corresponding to it in my database). When I make changes ...
Gillman asked 2/3, 2021 at 18:22

2

Solved

How to change name of a join table that EF Core 5 Created ? for example public class Food { public int FoodId { get; set; } public string Name { get; set; } public string Description { get; s...
Xylem asked 19/11, 2020 at 20:35

1

Solved

I have a table called "LogBookSystemUsers" and I want to setup many to many functionality in EF Core 5. I almost have it working but the problem is my ID columns are named SystemUserId an...
Stricture asked 27/11, 2020 at 21:15

0

I faced with slow start-up experience of my Xamarin.Android application. The first DbContext creation takes ~4.5 seconds (context has 24 tables). At first I thought that the reason for this is that...
Marengo asked 25/6, 2020 at 19:29

4

Solved

I have a legacy system with three databases Vendor CustomCode LogData Vendor contains control and log data from our Vendors app. CustomCode contains lots of views and stored procedures that jo...
1

© 2022 - 2024 — McMap. All rights reserved.