public async Task <BearerToken> RegisterUser(UserDomainObject userDomainObject) { using (ApplicationDbContext dbContext = new ApplicationDbContext()) { //userDomainObject.Password = } throw new NotImplementedException(); }
public async Task <RepositoryResponse <User> > ValidateCredentails(Credentials credentials) { RepositoryResponse <User> repositoryResponse = new RepositoryResponse <User>(); UserDomainObject user = await DbContext.Users.FirstOrDefaultAsync(usr => usr.Login == credentials.Login && usr.Password == credentials.Password); if (user == null) { repositoryResponse.Successful = false; } else { repositoryResponse.Value = Mapper.Map <User>(user); } return(repositoryResponse); }