public async Task DeleteAsync(LInkedInUserAuth parameters) { //var LinkedInUser = Uow.Repository<LinkedInUser>().FindByAsync(t=> t.LIUserId==parameters.LIUserId); await Uow.RegisterDeletedAsync(parameters); await Uow.CommitAsync(); //throw new NotImplementedException(); }
public async Task <object> GetBy(LInkedInUserAuth parameters) { var user = await Uow.Repository <LinkedInUser>().FirstOrDefaultAsync(t => (t.LIEmailId == parameters.LIEmailId) || (t.LIMobileNumber == parameters.LIMobileNumber)); if (user != null && PasswordHash.VerifySignature(parameters.Password, user.Password, user.Salt)) { return(await Task.FromResult(user)); } else { return(await Task.FromResult(0)); } //throw new NotImplementedException(); }
public async Task AddAsync(LInkedInUserAuth entity) { PasswordResult passwordResult = PasswordHash.Encrypt(entity.Password); LinkedInUser linkedInUser = new LinkedInUser(); linkedInUser.Password = passwordResult.Signature; linkedInUser.Salt = passwordResult.Salt; linkedInUser.LIFirstName = entity.LIFirstName; linkedInUser.LILastName = entity.LILastName; linkedInUser.LIRegistrationDate = entity.LIRegistrationDate; linkedInUser.IsActive = entity.IsActive; linkedInUser.LIMobileNumber = entity.LIMobileNumber; linkedInUser.LIEmailId = entity.LIEmailId; await Uow.RegisterNewAsync(linkedInUser); await Uow.CommitAsync(); }
public HashSet <string> DeleteValidation(LInkedInUserAuth parameters) { return(ValidationMessages); }
public async Task UpdateAsync(LInkedInUserAuth entity) { await Uow.RegisterDirtyAsync(entity); await Uow.CommitAsync(); }
public HashSet <string> UpdateValidation(LInkedInUserAuth entity) { return(ValidationMessages); }
public async Task <object> GetAsync(LInkedInUserAuth parameters) { return(await Uow.Repository <LinkedInUser>().AllAsync()); // throw new NotImplementedException(); }