ef-core-2.2 Questions
3
I have linq query like this in EF Core 2.0, It work as it is, but when I upgrade to EF Core 3.0 it always timeout. I found the issue in query = query.Where(x => x.Questions);.
My Question is i w...
Roer asked 3/11, 2019 at 3:8
2
Solved
I know there is a Load method.
_dbContext.Entry(blog).Collection(b => b.Posts).Load()
But I'm try to handle concurrency conflicts, I've been add a post into blog.Posts. if call Load, it do no...
Pothouse asked 16/7, 2019 at 15:5
4
Solved
I am getting this warning in my ASP.NET Core 2.2 application
warn: Microsoft.EntityFrameworkCore.Infrastructure[10402]
More than twenty 'IServiceProvider' instances have been created for internal ...
Spectrometer asked 3/2, 2020 at 21:32
3
Solved
I am writing a new application with ASP.NET Core 2.2.4 with EF Core Code First approach with migrations. I wrote my domain models and updated the database via Package Manager Console but this resul...
Yeanling asked 7/5, 2019 at 22:6
2
Solved
I have a common method across all objects in my service layer named "GetBaseEntity". This basically has a definition of:
public IQueryable<TEntity> GetBaseEntity(bool includeNavigation = tru...
Hanlon asked 4/6, 2019 at 16:11
2
Solved
I'm using PostgreSQL and I have ApplicationDbContext like:
public class ApplicationDbContext : DbContext
{
private readonly DatabaseSettings _databaseOptions;
public ApplicationDbContext() { }
...
Allay asked 23/4, 2019 at 20:46
2
For one to many relationship, what's the difference between HasMany and OwnsMany? When should I use one over another?
For example:
public class xxx
{
public virtual IReadOnlyCollection<xxxHi...
Ceria asked 23/10, 2019 at 6:38
6
Solved
I am using EF Core to connect to a Azure SQL Database deployed to Azure App Services. I am using an access token (obtained via the Managed Identities) to connect to Azure SQL database.
Here is how...
Muzzle asked 14/1, 2019 at 18:32
3
Solved
Setup
Asp.NET core website 2.2 and EF Core 2.2
Postgresql database with multiple schemas and one of the schema already has __EFMigrationsHistory table
when trying
Add-Migration x1 -Context YodaCo...
Bowlin asked 17/11, 2020 at 12:29
2
I understand that temporal tables are intended to give you a point in time view of the data. I am using temporal tables for auditing purpose. I have the following Temporal table.
Lets assume this ...
Prophylactic asked 24/2, 2020 at 21:27
2
I am using EF Core Power Tools version 2.4.0 with Miccrosoft.EntifyFrameworkCore.SqlServer version 2.2.6
I have SQL table column IsActive defined as [IsActive] [bit] NOT NULL
I use EF Core Power T...
Deva asked 26/2, 2020 at 17:9
2
Background
We are building a web application using ASP.Net Core and Entity Framework Core 2.2
We are connecting to legacy databases. The setup is that there are 16 databases, all with the exact s...
Butterworth asked 19/2, 2019 at 7:26
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
2
Solved
I'm trying to build an aspnetcore application over an existing system where the database is already created, and I'm going to add some tables over it.
I've reverse engineered the database to add t...
Intrepid asked 7/2, 2019 at 9:2
1
Solved
I have this MyEntity table in the database:
The data inside MyEntity is the following:
The EF Core entity is the following:
public class MyEntity
{
public int Id { get; set; }
public int M...
Plod asked 26/5, 2020 at 5:59
2
Solved
I have an EF Core 2.2 application that is working fine. Then I introduce procedures and know I can do this:
...In myContext
public virtual DbSet<MyProcsDbSet> MyProcsDbSet{ get; set; }
Ex...
Dietitian asked 16/8, 2019 at 0:21
2
Solved
I need to reuse available expression:
Expression<Func<Picture, int>> selector = o => o.EntityId;
And build expression for Where:
Expression<Func<Picture, bool>> filte...
Resistor asked 24/4, 2020 at 15:44
1
Solved
I would like to run blue green deployments; however, EF Migrations seem to block that. If I deploy version 1 to the Blue slot, create an EF Migrations and deploy version 2 to the Green slot, then o...
Stalky asked 29/10, 2019 at 13:17
2
Solved
I am building a new .Net Core 2.2 website at work and have tried a few different approaches, but I am receiving errors when using the Edit functionality after setting up the CRUD model. Initially I...
Loriannlorianna asked 4/10, 2019 at 14:44
2
Solved
I'm getting the following error:
ERROR:
SqlException: .NET Framework error during routine execution or user-defined aggregate 'geography':
System.ArgumentException: 24204: spatial reference id...
Pelorus asked 25/7, 2019 at 19:53
2
Solved
I am running a simple query against an Sql Server database using Entity Framework Core 2.2.6 however the GroupBy is not being executed on the server, instead it is being executed locally.
Is there...
Predict asked 5/9, 2019 at 13:50
1
I have got a method which contains a call to EF.Functions.Contains. Now I want to write unit tests for this method with a InMemory database, but I am getting instantly the following exception Syste...
Slalom asked 5/4, 2019 at 10:0
2
Solved
We are upgrading our code base from EF6.2 to EF Core 2.2, our team discovered that the default value of string based Identity key will generate a primary key column with
nvarchar(128) in EF 6.2 ...
Rhotacism asked 22/8, 2019 at 4:42
1
Solved
I'm using EF Core and code migrations. It's my understanding that the snapshot file is supposed to be the "target database" to build future migration files off of.
Situation:
1) I did an add-mi...
Swedenborgianism asked 22/4, 2019 at 20:33
2
Solved
I am trying to build a query like this
var d = dbContext.Picks
.Where( /* some conditions */ )
.GroupBy(x => new { gameDiff = x.Schedule.GameTotal.Value - x.TieBreakerScore.Value })
.Select(...
Shaikh asked 30/7, 2019 at 19:33
1 Next >
© 2022 - 2024 — McMap. All rights reserved.