public async Task <Results <bool> > UnActiveAccount(long identityUser, string accountId) { var account = await _repo.GetQueryAble <PandaAccount>() .Where(w => w.Id == accountId && w.UserAccounts.Any(a => a.PandaUserId == identityUser)) .FirstOrDefaultAsync(); account.Active = false; _repo.UpdateSpecficProperty(account, aa => aa.Active); return(await _repo.SaveAsync()); }
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); }