Isg.EntityFramework 0.8.0 Released

InterceptionContext is now passed to TypeInterceptor methods and ChangeInterceptor methods. This may result in breaking changes depending on if and how you have inherited those classes, but I’ve done my best to preserve existing behavior. I marked the obsolete methods as such.

The purpose of this change is enable the scenario where you want to write a log-record back to the database when a record is saved or deleted.

Update:

0.8.0 did not contain the updated assemblies.

0.8.1 does.

What happened?

My build server is configured so that it only creates and publishes packages from the last pinned build. I forgot to pin the build that has the changes. I’ve pinned the build and republished 0.8.1. I’ve created a workitem for myself to separate package creation from package publication so that I can inspect the package before it’s sent to Nuget.

7 thoughts on “Isg.EntityFramework 0.8.0 Released

  1. It appears that the nuget package for version 0.8.0 still contains the 0.7.0 assembly?

    I have completely un-installed and re-installed and even imported it into a new project and it is definitely downloading the 0.7.0 assembly even though packages.config shows that it has downloaded the 0.8.0 package,

    1. You are right. I have my build server so that it only creates and publishes packages from the last pinned build. I forgot to pin the build that has the changes. I’ve pinned the build and republished 0.8.1. I’ve created a workitem for myself to separate package creation from package publication so that I can inspect the package before it’s sent to Nuget.

  2. It seems there is another issue, this time with the TypeInterceptor. The TypeInterceptor has a method IsTargetEntity but it never appears to get called, and with a ChangeInterceptor applied to my context SaveChanges will crash every time I attempt to save some data which cannot be casted to the type of T.

    TypeInterceptor needs to be modified to check against IsTargetEntity before calling OnBefore or OnAfter

  3. I’ve created a pull request with the fix in (first time using bitbucket or any distributed source control so I wasn’t sure how to link the commit to the issue)

  4. Your first experience with a DVCS was to do a pull request? Right on! I’ll be getting you a new build soon.

  5. Yeah, I’m using TFS within my work environment and although it’s been on my list for a while, I just haven’t had the opportunity to play around with any DVCS systems until earlier today anyway!!

    1. I really enjoy working with DVCS and I’m lucky enough to be able to do it with work. I’m still learning all the differences between Git and Mercurial. I think Mercurial is easier to learn, but Git is more powerful.

      0.9.0 of the interceptors package is released. I had to make some additional changes beyond yours to make everything work as it should (AfterDelete is a difficult case!), but your change is in there and available at this point. Thanks for pointing out the bug, and for the pull request.

      Happy Coding!

Leave a Reply

%d bloggers like this: