Combine IdentityDbContext and TrackerContext

885 Views Asked by At

I have an existing EF-Project which uses "Tracker Enabled DbContext". To work with this package I have to derive from its "TrackerContext":

public class MyContext : TrackerContext {}

TrackContext itself derives from DBContext:

public class TrackerContext : DbContext, ITrackerContext, IDbContext, IDisposable

(info from metadata)

Now I want to add Identity to my project (OWIN). For this to happen I have to derive from IdentityDBContext:

 public class MyContext: IdentityDbContext<UserOwin> 

So I am in a bit of a dilemma here: How can I use AspNetIdentity without losing the Tracking functionality?

1

There are 1 best solutions below

1
Ole Albers On BEST ANSWER

Solved this. There is a nuget-package for exactly that specific issue:

TrackerEnabledDbContext.Identity