You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a main entity Profile that has a property Name that is a value object. The Name object has two properties First and Last. When I use the Fluent API to map the Name objects properties to columns within the Profile table I specify that they are required. When I create the migration it says nullable is true. I assume it has to do with the fact that in EF Core 3.0 owned entities are now optional but how do I tell EF that they are actually required?
I have a main entity Profile that has a property Name that is a value object. The Name object has two properties First and Last. When I use the Fluent API to map the Name objects properties to columns within the Profile table I specify that they are required. When I create the migration it says nullable is true. I assume it has to do with the fact that in EF Core 3.0 owned entities are now optional but how do I tell EF that they are actually required?
EF Core version: 3.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET Core 3.0
Operating system: Windows 10 1903 latest updates
IDE: Visual Studio 2019 16.3.5
I also posted this on stackoverflow:
https://stackoverflow.com/questions/58417334/how-to-make-an-ownsone-property-in-ef-core-3-0-required-when-mapping-to-sql-serv
Any help you can provide would be great.
Take care,
Ken
The text was updated successfully, but these errors were encountered: