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

EF Core Breaking Change - Mitigation #802

Closed MarkLFT closed 1 year ago

MarkLFT commented 1 year ago

Do you have any plans to add the mitigation for the workaround in the latest version of EF Core for tables with computed fields that use Functions()? https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes#sql-server-tables-with-triggers-or-certain-computed-columns-now-require-special-ef-core-configuration

We have several legacy databases which we are slowly migrating to micro-services and EF Core, but a reasonable number of these tables contain convenience fields that use computed fields which contain scalar functions. In the latest release of EF Core, saving a record to these tables fails.

There is a mitigation which we manually add to the entity configuration currently, until we can look at all the computed fields. But I was wondering if this is something we could include in this generator? i.e. for tables that contain a computer field, and only those tables, force the old-style saving. That way I wouldn't miss any. ;-)

sjh37 commented 1 year ago

Hi Mark, v3.8.0 added .HasTrigger() for tables with triggers for EF Core 7. I missed the info about doing the same for computed columns! Thanks for bringing this to my attention, completely missed it. I'll get that added.

sjh37 commented 1 year ago

This will be in the next release v3.8.2 which will be later today.

sjh37 commented 1 year ago

This has been released in v3.8.2. Any problems, please let me know.

MarkLFT commented 1 year ago

Hi Simon,

Just wanted to say a huge thank you for your great support on this product.

From: Simon Hughes @.> Sent: Tuesday, May 9, 2023 12:42 AM To: sjh37/EntityFramework-Reverse-POCO-Code-First-Generator @.> Cc: Mark Townsend @.>; Author @.> Subject: Re: [sjh37/EntityFramework-Reverse-POCO-Code-First-Generator] EF Core Breaking Change - Mitigation (Issue #802)

This has been released in v3.8.2. Any problems, please let me know.

— Reply to this email directly, view it on GitHubhttps://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/802#issuecomment-1538706047, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABHGCO4Q2TGASMKU6LMYMVTXFEO4LANCNFSM6AAAAAAXZUXWSI. You are receiving this because you authored the thread.Message ID: @.**@.>>

--

This email was Malware checked by UTM 9. http://www.sophos.com