-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for: Issue 238 - Bug: Batch Update with Inheritance #245
base: master
Are you sure you want to change the base?
Conversation
*Added* Added support for TPT, TPC, and TPH BatchDelete and BatchUpdate to EF5, EF6 Added support for TPC and TPH BatchDelete and BatchUpdate to EFCore .NET 4.5.1. EFCore 1.x doesn't support TPT. Added six unit tests to test for BatchDelete and BatchUpdate Inheritance Compared tests between EF5 and EF6, added some that were missing. *Changed* Updated all nuget packages to the highest revision without changing major revisions. Ex: 1.0.0 -> 1.1.3 Changed NETStandard version to 1.6 (from 1.3) Disabled signing until PFX file is restored Some general bug fixes and code clean up to get projects to compile for EF5, EF6, and EFCore *Removed* Removed cross platform support from testing libraries. Meaning they have the code they need to under their target platforms and nothing extra. Removed references to the EFPlus Nuget Packages from the Test projects
*Fixed* Fixed disappearance of AllowPropertyFilter
Oh damn... 160 file modified ;) I will look at it this week Best Regards, Jonathan |
Yea it might have been a bit of an interesting project. |
Hello @novamxd , I have started to investigate it. I made some quick test and it seems to work very fine. There is some additional code that I will add since some people will want to use the features like this: int intRowsAffected2 = tcContext.Inheritance_TPC_Animals.Update(i => new Inheritance_TPC_Dog()
{
ColumnInt = 1
}); Most context normally doesn't have a DbSet for I will probably have to split the EF5|EF6 code from EF Core as a one point, there is not enough thing similar and it make it very hard to maintain. Time is currently heavily missing but I hope to be able to complete the integration before the end of the month. Best Regards, Jonathan |
Hey @JonathanMagnan , Ok, so long as you don't remove the ability to delete from the sub classes then that works. Realistically speaking I don't know why someone would use TPC if they're not going to reference the sub-classes, as that's the point. Being a DBA I can say that if they wanted the approach you're speaking of, they're likely to go down the TPH route instead, which is already supported with the update I made. Also did you want a hand splitting up the EF5/6 and Core libraries? I was pretty tempted to do that as part of this update but figured it would just complicate the update. Regards |
Hello @novamxd , You might be very surprised with all kind of context I have viewed so far ;) A lot of people doesn't reference sub-classes (and some are not even aware they could do it), so that's for sure something that need to be supported. Thank a lot of your help proposition, I believe for this one, it's better I try to do it by merging some of your work to make sure I understand all the code you added, that will make it easier to support it later. Best Regards, Jonathan |
Hey @JonathanMagnan , Do they reference sub-classes with TPC or TPH? Like I said, using the base class with TPH makes sense and I've seen lots of examples for that. To use that with TPC would seem strange, but again, so long as the batch functions work with the sub-classes, I honestly am indifferent. As for the update and splitting, I agree that getting familiar with the update is the best approach. But if after you finish the merge you want a hand splitting up the libraries, just let me know. Regards |
To make it short, people do everything in every possible way that you may never think ;) |
I am using Asp.net mvc and doing operation like e.g. I am using Entityframework.Plus library for audit but update is not working other than this new insertion is working fine. I am overriding savechanges() for audit. please on this |
@JonathanMagnan Is there still progress on this? Having the same problem here... |
Should already be fixed in https://entityframework-extensions.net/
There is currently no short term plan to make a fix on EF Plus at this moment. |
Thanks, did work :-) |
All the changes I did. Hopefully I did this pull request/forking right... I've never played with this part of Git Hub before.