base logic #5

Merged
mfnefd merged 25 commits from registration into main 2024-06-10 12:27:55 +04:00
2 changed files with 4 additions and 12 deletions
Showing only changes of commit be9c47aefa - Show all commits

View File

@ -13,7 +13,7 @@ namespace DatabaseImplement.Implements
{ {
public RoleBindingModel? Delete(RoleSearchModel model) public RoleBindingModel? Delete(RoleSearchModel model)
{ {
if (model is null || model.Id is null) if (model.Id is null)
{ {
return null; return null;
} }
@ -32,7 +32,7 @@ namespace DatabaseImplement.Implements
public RoleBindingModel? GetElement(RoleSearchModel model) public RoleBindingModel? GetElement(RoleSearchModel model)
{ {
if (model is null || model.Id is null) if (model.Id is null)
{ {
return null; return null;
} }
@ -60,10 +60,6 @@ namespace DatabaseImplement.Implements
public RoleBindingModel? Insert(RoleBindingModel model) public RoleBindingModel? Insert(RoleBindingModel model)
{ {
if (model is null)
{
return null;
}
var context = new Database(); var context = new Database();
var newRole = Models.Role.ToRoleFromBinding(model); var newRole = Models.Role.ToRoleFromBinding(model);

View File

@ -15,7 +15,7 @@ namespace DatabaseImplement.Implements
{ {
public UserBindingModel? Delete(UserSearchModel model) 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; return null;
} }
@ -35,7 +35,7 @@ namespace DatabaseImplement.Implements
public UserBindingModel? GetElement(UserSearchModel model) 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; return null;
} }
@ -67,10 +67,6 @@ namespace DatabaseImplement.Implements
public UserBindingModel? Insert(UserBindingModel model) public UserBindingModel? Insert(UserBindingModel model)
{ {
if (model is null)
{
return null;
}
var context = new Database(); var context = new Database();
var newUser = Models.User.ToUserFromBinding(model); var newUser = Models.User.ToUserFromBinding(model);