fix storages

This commit is contained in:
mfnefd 2024-06-04 23:43:52 +04:00
parent 51d26c58d7
commit be9c47aefa
2 changed files with 4 additions and 12 deletions

View File

@ -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);

View File

@ -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);