SetupEntitiesDirect fails if one uses records in the entities
See original GitHub issuepublic class entity:
{
[Key]
public long Id { get; set; }
public Reference Object { get; set; }
}
[Owned]
public record Reference {
public Reference(string type, Guid id)
{
Id = id;
Type = type;
}
[StringLength(50)]
public string Type { get; set; }
public Guid Id { get; set; }
}
will fail with The class Reference was not found in the TestCtx DbContext. The class must be either be an entity class derived from the GenericServiceDto/Async class.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
c# - cannot add view to the edmx
Just add a column to your view I added a Row_Number to create a key like this. SELECT ISNULL(CAST((row_number() OVER (ORDER BY tab....
Read more >ReleaseNotes.md
A library to help you quickly code CRUD accesses for a web/mobile/desktop application using EF Core. - EfCore.GenericServices/ReleaseNotes.md at master ...
Read more >EfCore.GenericServices 1.2.6
This library helps you quickly code Create, Read, Update and Delete (CRUD) accesses for a web/mobile/desktop application. It acts as a adapter ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Interesting. I have reproduced this error in this test. I will work on it, but I have other things so might be some days.
Hi @Akku-21,
That was an interesting problem caused to the
IEntityTypefor an Owned Type class changed in EF Core 6. I’m now using theIsOwnedtype which came out in EF Core 5.