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