private bool ConfirmAccount(String confirmationToken) { using (var context = new PhotoGalleryContext()) { 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; }
public RoleRepository(PhotoGalleryContext context) : base(context) { }
public UserRepository(PhotoGalleryContext context) { this.context = context; dbSet = context.Set<User>(); }
public UserRepository(PhotoGalleryContext context, IRoleRepository roleReposistory) : base(context) { _roleReposistory = roleReposistory; }
public LoggingRepository(PhotoGalleryContext context) : base(context) { }
public CustomerRepository(PhotoGalleryContext context) : base(context) { }
public ChatUserRepository(PhotoGalleryContext context) : base(context) { }
public AlbumRepository(PhotoGalleryContext context) : base(context) { }
/// <summary> /// Ctor Album Repository /// </summary> /// <param name="context">PhotoGalleryContext</param> public AlbumRepository(PhotoGalleryContext context) { _context = context; }
public MessageRepository(PhotoGalleryContext context) : base(context) { }
public EntityBaseRepository(PhotoGalleryContext context) { _context = context; }
public UserRepository(PhotoGalleryContext context) { _context = context; }