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>();
 }
示例#4
0
 public UserRepository(PhotoGalleryContext context, IRoleRepository roleReposistory)
     : base(context)
 {
     _roleReposistory = roleReposistory;
 }
示例#5
0
 public LoggingRepository(PhotoGalleryContext context)
     : base(context)
 {
 }
示例#6
0
 public CustomerRepository(PhotoGalleryContext context)
     : base(context)
 {
 }
 public ChatUserRepository(PhotoGalleryContext context)
     : base(context)
 {
 }
示例#8
0
 public AlbumRepository(PhotoGalleryContext context)
     : base(context)
 {
 }
示例#9
0
 /// <summary>
 /// Ctor Album Repository
 /// </summary>
 /// <param name="context">PhotoGalleryContext</param>
 public AlbumRepository(PhotoGalleryContext context)
 {
     _context = context;
 }
示例#10
0
 public MessageRepository(PhotoGalleryContext context)
     : base(context)
 {
 }
示例#11
0
 public EntityBaseRepository(PhotoGalleryContext context)
 {
     _context = context;
 }
示例#12
0
 public UserRepository(PhotoGalleryContext context)
 {
     _context = context;
 }