fix mannually verify error
This commit is contained in:
@@ -245,7 +245,7 @@ public class PersonalContractingPartyRepository : RepositoryBase<long, PersonalC
|
||||
return new();
|
||||
}
|
||||
|
||||
return _accountContext.Accounts.Where(x => x.id == accId && x.IsActiveString == "true").Select(x =>
|
||||
return _accountContext.Accounts.Where(x => x.id == accId).Select(x =>
|
||||
new AccountViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
@@ -845,8 +845,7 @@ public class PersonalContractingPartyRepository : RepositoryBase<long, PersonalC
|
||||
public async Task<OperationResult> ActiveAllAsync(long id)
|
||||
{
|
||||
OperationResult result = new OperationResult();
|
||||
await using var transaction =await _context.Database.BeginTransactionAsync();
|
||||
await using var accountTransaction = await _accountContext.Database.BeginTransactionAsync();
|
||||
|
||||
try
|
||||
{
|
||||
var personel = _context.PersonalContractingParties
|
||||
@@ -890,15 +889,12 @@ public class PersonalContractingPartyRepository : RepositoryBase<long, PersonalC
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
await transaction.CommitAsync();
|
||||
await accountTransaction.CommitAsync();
|
||||
|
||||
result.Succcedded();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result.Failed("فعال کردن طرف حساب با خطا مواجه شد");
|
||||
await transaction.RollbackAsync();
|
||||
await accountTransaction.RollbackAsync();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user