Business logic fix
This commit is contained in:
parent
0bfd5f0c6a
commit
abba237b7b
@ -36,7 +36,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
{
|
||||
CheckModel(model, false);
|
||||
_logger.LogInformation($"Delete. ID:{model.ID}");
|
||||
if (_storage.Insert(model) == null) {
|
||||
if (_storage.Delete(model) == null) {
|
||||
_logger.LogWarning("Delete operation failed");
|
||||
return false;
|
||||
}
|
||||
@ -45,7 +45,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
public bool Update(CategoryProductBindingModel model)
|
||||
{
|
||||
CheckModel(model);
|
||||
if (_storage.Insert(model) == null) {
|
||||
if (_storage.Update(model) == null) {
|
||||
_logger.LogWarning("Update operation failed");
|
||||
return false;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
{
|
||||
CheckModel(model, false);
|
||||
_logger.LogInformation($"Delete. ID:{model.ID}");
|
||||
if (_storage.Insert(model) == null)
|
||||
if (_storage.Delete(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Delete operation failed");
|
||||
return false;
|
||||
@ -48,7 +48,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
public bool Update(RoleBindingModel model)
|
||||
{
|
||||
CheckModel(model);
|
||||
if (_storage.Insert(model) == null)
|
||||
if (_storage.Update(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Update operation failed");
|
||||
return false;
|
||||
|
@ -38,7 +38,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
public bool Update(UserBindingModel model)
|
||||
{
|
||||
CheckModel(model);
|
||||
if (_storage.Insert(model) == null)
|
||||
if (_storage.Update(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Update operation failed");
|
||||
return false;
|
||||
@ -50,7 +50,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
||||
{
|
||||
CheckModel(model, false);
|
||||
_logger.LogInformation($"Delete.ID:{model.ID}");
|
||||
if (_storage.Insert(model) == null)
|
||||
if (_storage.Delete(model) == null)
|
||||
{
|
||||
_logger.LogWarning("Delete operation failes");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user