Truncating values

Hi

I have a little problem. I have used CRUD and in the database the four values that start with SRS are defined

[SRS] [numeric](4, 3) NULL,
[SRSWithOutHeadSail] [numeric](4, 3) NULL,
[SRSSH] [numeric](4, 3) NULL,
[SRSSHWithOutHeadSail] [numeric](4, 3) NULL,

When i store 1,001 it will be stored a 1,00 so the last digit is truncated. I have debuged and I can’t find what’s wrong

Is you can see that other boats have the right numbers, they are create with a stored procedure.

Can you post the DbContext how HasPrecision() is defined for these properties and if they are mapped to decimal type in the model?

SailItV2DBContext.zip (1.2 KB)

Cant find HasPrecision in this file.

What version of RBS you have used to generate this DbContext?

Radzen Blazor Studie 1.61.0

What type is your database? Can you verify also if the mapped property is double or decimal?

Hi

SqlServer on Azure and the data type is decimal(4,3)

I’m asking the for the type of the C# property in your scaffolded model.

    public decimal? SRS { get; set; }

    public decimal? SRSWithOutHeadSail { get; set; }

    public decimal? SRSSH { get; set; }

    public decimal? SRSSHWithOutHeadSail { get; set; }

Unfortuantely we cannot tell why there is no HasPrecision() genertated for these properties in the DbContext from the information provided so far. We will need your database schema (just schema, no data) in order to debug locally our scaffolding. Please zip and send the schema to info@radzen.com.

Ok will do that in a moment

TotScript.zip (3.0 KB)

We were able to identify and fix the problem - the fix will be part of our next update later the week!

Ok, thanks for that, when will the next version be ready

Before the end of the week.