entity-framework-core-3.0 Questions
2
Solved
I am trying to keep BooksContext.cs file in a folder called Contexts.
I have a single Book class inside Entities folder. Hence, below is the code in BookContext.cs file.
I have used the following...
Polyvinyl asked 30/10, 2019 at 6:9
2
So EF Core preview 7 was released and I decided to use it along with C# 8 previews and .NET Core 3.0 preview 7. Let's say I have a class representing a many-to-many relationship:
public class A
{...
Avalokitesvara asked 29/7, 2019 at 9:40
6
Solved
I have the following Entity Framework Core 3.0 query:
var units = await context.Units
.SelectMany(y => y.UnitsI18N)
.OrderBy(y => y.Name)
.GroupBy(y => y.LanguageCode)
.ToDictionaryAs...
Benzofuran asked 27/9, 2019 at 16:43
5
Solved
Issue with Azure Functions/EFSQLSERVER .NET CORE 3.0:
To reproduce:
Use Visual Studio 2019 16.2.1
Use Azure Function template to create a project.
Changed Target Framework to .NET Core 3.0
Add ...
Cenis asked 4/10, 2019 at 18:25
7
Solved
I'm trying to upgrade a solution to the new Core Framework 3.0.0.
Now I'm having a small issue I don't understand.
Look, this method was unproblematic in 2.2.6:
public async Task<IEnumerable&l...
Manning asked 24/9, 2019 at 7:9
1
Perhaps my expectation requires resetting.
I was doing a proof of concept for a "non-tracking" context.
In the constructor of the context, I added the following lines:
ChangeTracker.Query...
Langbehn asked 21/7, 2020 at 4:2
3
Solved
I'm running a fairly simple query in Microsoft Entity Framework Core 3.0 that looks like this:
var dbProfile = db.Profiles.Where(x => x.SiteId == Int32.Parse(id))
.Include(x => x.Interests)...
Outland asked 11/10, 2019 at 21:21
1
Solved
Currently when there is a mistake in the config of the DBContext model, we get an error at run-time. For example:
The entity type 'MyObject' requires a primary key to be defined. If you intended...
Nonstriated asked 14/1, 2020 at 10:53
1
Solved
I have a ASP.NET Core 2.2 WebApi project which uses also EF Core 2.2. The project is tested via integration tests with WebApplicationFactory<T>.
I tried to migrate the the web api project to...
Glandular asked 14/10, 2019 at 11:9
1
Solved
I had the following code, which was running well with EF Core 2.1:
.FirstOrDefault(a => (a.Name.Equals(b, StringComparison.InvariantCultureIgnoreCase).
(Ok, running well means I got the right ...
Dallon asked 25/11, 2019 at 10:13
2
Solved
I am trying to migrate a Web API from .NET Core 2.2 to .NET Core 3.0 and I have stumbled across the following:
public Dictionary<int, Tag> GetTagMap(IList<int> tagIds = null)
{
var ta...
Liar asked 4/11, 2019 at 9:29
1
Solved
This happened at home first, so I thought maybe it was an issue with my desktop PC at home. But now that I am back at work, I tried the upgrade and got the same thing.
Screenshot before upgrade
Sc...
Acervate asked 24/9, 2019 at 9:23
1
© 2022 - 2024 — McMap. All rights reserved.