I am getting the following Exception while trying to save a value in db via EntityFramework
InnerException: An error occurred while updating the entries. See the inner exception for details.
InnerException -> InnerException: Parameter value '163753323027.987000000' is out of range.
I tried all the solutions provided. But still unable to resolve the issue. I am using EntityFramework, SQL Server. This is not code-first.
In my table I have a column
ActualHydPressureDropPipe decimal(30, 10)
The value application is attempting to store in the db is 163753323027.987000000
I can not try the answer provided here here because I donot have EntityTypeConfiguration class.
I tried the answer give here
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<Mud_Volumes>().Property(x => x.ActualHydPressureDropPipe).HasPrecision(30, 10);
base.OnModelCreating(modelBuilder);
}
This is not working either. I am not sure why the control is not entering into the above method. May be because this is not code first.
I checked in my edmx I have
<Property Type="Decimal" Name="ActualHydPressureDropPipe" Nullable="false" Precision="30" Scale="10" />
Please advice.
I tried everything. I tried increasing the Precision and Range.. But the issue still persisted. Funny thing is It automatically got solved once I restarted my Visual Studio.
Strange. But some times some things just need a restart to fix themselves.