Entity Framework DbContext and mapping decimal properties with more than 2 digits of scale

Posting this mostly as a reminder to myself that when more than two decimal places of scale (i.e. to the right of the decimal point) is needed when mapping an EF entity property, you must specify the property’s precision in your DbContext’s OnModelCreating event like so:

public class MyDbContext : DbContext, IDbContext
   protected override void OnModelCreating(DbModelBuilder modelBuilder)
      modelBuilder.Entity<OutYearPoolRate>().Property(r => r.Rate).HasPrecision(14, 8);

Failure to do so causes EF to truncate the values to 2 decimal places when updating the database.