Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Trouble with decimal precision and scale using Code First (no replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1451

Trending Articles