sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
700 stars 230 forks source link

Configuration / Data Types for Stored Procedure Return Model #778

Open MarkLFT opened 1 year ago

MarkLFT commented 1 year ago

I have noticed that stored procedures do not define a configuration class for the return model. This causes warnings because of data types and precision. Specifically, one of our databases makes extensive use of Money type fields in the database, and we need to inform EF of the underlying data type to prevent the warnings.

Is there a setting I am missing that creates the config classes for stored procedure return classes? If not, what is the recommended way to resolve this issue?

Thanks

sjh37 commented 1 year ago

I have recreated the problem

Pricejd commented 1 year ago

I am also experiencing this issue. Since we use a lot of decimal types in stored procedures and functions, EF generates a TON of model validation warnings on startup / ModelValidation. I am using 3.7.0, and EFCore 6. I was hoping there was a workaround.

rcheung9 commented 3 weeks ago

Still having this problem in 3.9.0

sjh37 commented 3 weeks ago

I am still working on it. This is due to an error being returned from SQL Server when using #temp' tables as part of the return data. As a fallback if I receive an error, am implementing the use ofsp_describe_first_result_set` which will correctly return the columns.