Answer the question
In order to leave comments, you need to log in
Why does decimal.Parse work like this?
Good afternoon,
I get a number (type in base decimal(38,20)) in type string in c# service
var kk = decimal.Parse("884413000");
// kk == 884413000M // что за M?
var entity = new VendorsLogEntry();
entity.LastBalanceAmount = 884413000M;
db.VendorsLogEntry.Add(entity);
await db.SaveChangesAsync(); //OverflowException: Переполнение при преобразовании.
modelBuilder.Entity<VendorsLogEntry>()
.Property(e => e.LastBalanceAmount)
.HasPrecision(38, 20);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question