Skip to content

Instantly share code, notes, and snippets.

@wullemsb
Created November 14, 2017 07:53
public class ProductMap : EntityTypeConfiguration<Product>
{
public override void Map(EntityTypeBuilder<Product> builder)
{
builder.HasKey(x => x.Id);
builder.Property(x => x.Id)
.HasValueGenerator<GuidValueGenerator>()
.ValueGeneratedOnAdd()
.IsRequired();
//Removed other mappings
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment