TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
208 stars 53 forks source link

Update to EF Core 6 #190

Closed Rich-Ott closed 2 years ago

Rich-Ott commented 2 years ago

Describe your proposed changes This set of changes updates the project to EF Core 6 (Issue #181), including the Many-to-Many relationship (skip navigation) scaffolding.

I removed the EnableNullableReferenceTypes Handlebars option in favor of using the built-in option for UseNullableReferenceTypes, which now needed to be passed to the internal Write* methods. A side benefit of this is that enabling nullable references only needs to happen in one place now (in the csproj file). Other than that, I did my best to keep everything consistent while also updating various aspects so the resultant output more closely matched the default scaffolding output of EF Core 6.

It felt like there was a lot of things to update to make it compatible with EF Core 6 and support the many-to-many relationships, but all of the test cases are passing, the samples projects are transforming as I expected and my personal projects also update as expected.

tonysneed commented 2 years ago

@Rich-Ott Excellent! I agree with the decision to deprecate the EnableNullableReferenceTypes Handlebars option in favor of using the built-in option for UseNullableReferenceTypes. Also appreciate adding support for M-M relationship scaffolding. I will review this PR today and see if I can merge it ASAP. Thank you!