If I use a Guid based strongly typed id EF Core throws the following exception
System.InvalidOperationException : The property 'Foo.Id' could not be mapped, because it is of type 'FooId' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
I can work around that issue by initializing the property
public class Foo
{
public FooId Id { get; set; } = FooId.New();
}
but auto-generation by convention would be really nice.
If I use a
Guid
based strongly typed id EF Core throws the following exceptionSystem.InvalidOperationException : The property 'Foo.Id' could not be mapped, because it is of type 'FooId' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
I can work around that issue by initializing the property
but auto-generation by convention would be really nice.
Is that possible?