EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
Decimal type is missing precision and scale
Hi,
For decimal type there are no properties generated, which would indicate how many numbers are allowed for this field.
In our database we have limits set for each decimal field:
I would like to have a property, the same way you have made for nvarchar, that would tell what are the limits for each decimal field.
Right now it generates the following:
[Column(@"PL_GrossAmount", Order = 7, TypeName = "decimal")]
[Required]
[Display(Name = "Pl gross amount")]
public decimal PlGrossAmount { get; set; } // PL_GrossAmount
Thanks
@sjh37 is there a way to handle this for stored procedure return models? We have handled it with the tables returns using the Settings.UpdateColumn delegate and set the necessary precision and scale, but we havent been able to find where to set this for stored procedure return models.
Hi @janissimsons Is this for EF Core? EF6 already supports the .HasPrecision(precision, scale) however support for EF Core was lacking.
This has now been added to EF Core just 11 days ago, but so far has not yet been released. See https://github.com/dotnet/efcore/pull/20468