1 public class EFDbContext : DbContext2 {3 protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder)4 {5 modelBuilder.Entity().Property(object => object.property).HasPrecision(12, 10);6 7 base.OnModelCreating(modelBuilder);8 }9 }
1 public DecimalPropertyConfiguration HasPrecision(2 byte precision,3 byte scale )
This is to show how to configure the precision by overriding the DbContext.OnModelCreating() method.
You can check information about this on the page: