I have this model:
public class Book
{
public int Id { get; set; }
public string Name { get; set; }
public Uri Link { get; set; }
}
I added it to fluent-api using the following code:
builder.Entity<Book>(entity => {
entity.HasKey(b => b.Id);
});
when I run this:
add-migration InitialMigration -context MyAppContext
then I get:
No suitable constructor found for entity type 'Uri'. The following parameters could not be bound to properties of the entity: 'uriString', 'uriString', 'dontEscape', 'baseUri', 'relativeUri', 'dontEscape', 'uriString', 'uriKind', 'baseUri', 'relativeUri', 'serializationInfo', 'streamingContext', 'baseUri', 'relativeUri', 'flags', 'uriParser', 'uri'.