Beispiel #1
0
        public Task SetPasswordHashAsync(ApplicationUser user, string passwordHash)
        {
            //throw new NotImplementedException();
            var db = new PubSystemEntities();

            db.Users.SingleOrDefault(uu => uu.id_user.ToString() == user.Id).password = passwordHash;
            db.SaveChanges();

            return(Task.FromResult(true));
        }
Beispiel #2
0
        public Task <ApplicationUser> FindByNameAsync(string userName)
        {
            var u = new PubSystemEntities().Users.SingleOrDefault(uu => uu.login_name == userName);

            return(Task <ApplicationUser> .Factory.StartNew(() => u != null?new ApplicationUser { UserName = u.login_name, Id = u.id_user.ToString(), Email = u.email, Password = u.password } : null));
        }