public async Task <Results <bool> > Create(PandaAccount newAccount) { await _repo.AddAsync(newAccount); var result = await _repo.SaveAsync(); return(result); }
public async Task <bool> ClearRefreshToken(long identityUser) { var user = await _repo.GetQueryAble <PandaUser>().Where(w => w.Id == identityUser).FirstOrDefaultAsync(); user.RefreshToken = null; _repo.UpdateSpecficProperty(user, u => u.RefreshToken); var result = await _repo.SaveAsync(); return(result.Data); }
public async Task UpdateRefreshToken(string email, string newRefreshToken) { Expression <Func <GenericUser, bool> > predicate = f => f.Email.ToUpper().Equals(email.ToUpper()); var result = await _genericEFRepo.FirstOrDefaultAsync <GenericUser>(predicate); result.RefreshToken = newRefreshToken; await _genericEFRepo.SaveAsync(); }