base logic #5
@ -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);
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user