Exemplo n.º 1
0
 /// <summary>
 ///     If disposing, calls dispose on the Context.  Always nulls out the Context
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (DisposeContext && disposing && Context != null)
     {
         Context.Dispose();
     }
     _disposed  = true;
     Context    = null;
     _userStore = null;
 }
Exemplo n.º 2
0
 public CustomUserStore(DbContext context)
 {
     Context         = context;
     AutoSaveChanges = true;
     _userStore      = new EntityStore <TUser>(context);
     _roleStore      = new EntityStore <TRole>(context);
     _logins         = Context.Set <TUserLogin>();
     _userClaims     = Context.Set <TUserClaim>();
     _userRoles      = Context.Set <TUserRole>();
 }