public UserRepository(JustCreativePublishingsContext context)
 {
     this.context = context;
         dbSet = context.Set<User>();
 }
 public RoleRepository(JustCreativePublishingsContext context)
 {
     this.context = context;
     dbSet = context.Set<IdentityRole>();
 }
 private bool ConfirmAccount(String confirmationToken)
 {
     using (var context = new JustCreativePublishingsContext())
     {
         var user = context.Users.SingleOrDefault(u => u.ConfirmationToken == confirmationToken);
         if (user != null)
         {
             user.IsConfirmed = true;
             var dbSet = context.Set<User>();
             dbSet.Attach(user);
             context.Entry(user).State = EntityState.Modified;
             context.SaveChanges();
             return true;
         }
     }
     return false;
 }