Trouble with decimal precision and scale using Code First
Posted by: Jared Jensen
Date: March 19, 2012 12:16PM

I'm trying to use Connector/Net 6.4.4 with EF 4.1 to generate a MySQL 5.5 decimal(19,4) column using the following code:

protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Payment>().Property(x => x.Amount).IsRequired().HasColumnType("decimal").HasPrecision(19, 4);
}

But a decimal(10,0) column is generated instead. Am I missing something, or is this not supported by Connector/Net?

Options: ReplyQuote


Subject
Written By
Posted
Trouble with decimal precision and scale using Code First
March 19, 2012 12:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.