diff --git a/DatabaseImplement/Implements/RoleStorage.cs b/DatabaseImplement/Implements/RoleStorage.cs index 976c5b7..4394a59 100644 --- a/DatabaseImplement/Implements/RoleStorage.cs +++ b/DatabaseImplement/Implements/RoleStorage.cs @@ -13,7 +13,7 @@ namespace DatabaseImplement.Implements { public RoleBindingModel? Delete(RoleSearchModel model) { - if (model is null || model.Id is null) + if (model.Id is null) { return null; } @@ -32,7 +32,7 @@ namespace DatabaseImplement.Implements public RoleBindingModel? GetElement(RoleSearchModel model) { - if (model is null || model.Id is null) + if (model.Id is null) { return null; } @@ -60,10 +60,6 @@ namespace DatabaseImplement.Implements public RoleBindingModel? Insert(RoleBindingModel model) { - if (model is null) - { - return null; - } var context = new Database(); var newRole = Models.Role.ToRoleFromBinding(model); diff --git a/DatabaseImplement/Implements/UserStorage.cs b/DatabaseImplement/Implements/UserStorage.cs index 7622895..59a8a2a 100644 --- a/DatabaseImplement/Implements/UserStorage.cs +++ b/DatabaseImplement/Implements/UserStorage.cs @@ -15,7 +15,7 @@ namespace DatabaseImplement.Implements { public UserBindingModel? Delete(UserSearchModel model) { - if (model is null || (model.Id is null && model.Email is null)) + if (model.Id is null && model.Email is null) { return null; } @@ -35,7 +35,7 @@ namespace DatabaseImplement.Implements public UserBindingModel? GetElement(UserSearchModel model) { - if (model is null || (model.Id is null && model.Email is null)) + if (model.Id is null && model.Email is null) { return null; } @@ -67,10 +67,6 @@ namespace DatabaseImplement.Implements public UserBindingModel? Insert(UserBindingModel model) { - if (model is null) - { - return null; - } var context = new Database(); var newUser = Models.User.ToUserFromBinding(model);