some minor fixes in BusinessLogic
This commit is contained in:
parent
7f7a7d6a93
commit
e58cae2cb3
@ -99,7 +99,7 @@ namespace BankBusinessLogic.BusinessLogic
|
||||
_logger.LogInformation("Account. Number: {Number}. ManagerId: {ManagerId}. Id: {Id} ",
|
||||
model.Number, model.ManagerId, model.Id);
|
||||
var element = _accountStorage.GetElement(new AccountSearchModel { Number = model.Number });
|
||||
if (element != null)
|
||||
if (element != null && element.Id != model.Id)
|
||||
throw new InvalidOperationException("Счет с таким номером уже есть");
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ namespace BankBusinessLogic.BusinessLogic
|
||||
_logger.LogInformation("Manager. FIO:{FIO}. Email:{ Email}. Password:{ Password}. Id: { Id} ",
|
||||
model.Fio, model.Email, model.Password, model.Id);
|
||||
var element = _managerStorage.GetElement(new ManagerSearchModel { Email = model.Email });
|
||||
if (element != null)
|
||||
if (element != null && element.Id != model.Id)
|
||||
throw new InvalidOperationException("Менеджер с таким Email уже есть");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user