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

C# 11 Compiler warning C8981 for dtproperty #784

Closed baldvinhansson closed 1 year ago

baldvinhansson commented 1 year ago

After updating to C# 11 the generator will produce code resulting in a C8981 compilation warning for public partial class dtproperty. Is there a way to have the generator choose a different name for this class or somehow prevent this warning from occurring without either disabling the C8981 warning or manually renaming the class to something like DtProperty, dtProperty etc. each time the generator runs?

sjh37 commented 1 year ago

Hi @baldvinhansson You can rename tables in your .tt file. Look at the callback Settings.TableRenam at approximately line 275. You should see some commented out examples there.