dev #14
@ -32,7 +32,7 @@ namespace DatabaseImplement.Implements
|
||||
|
||||
public RoleBindingModel? GetElement(RoleSearchModel model)
|
||||
{
|
||||
if (model.Id is null && string.IsNullOrWhiteSpace(model.Name))
|
||||
if (model.Id is null && string.IsNullOrWhiteSpace(model?.Name))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@ -46,7 +46,7 @@ namespace DatabaseImplement.Implements
|
||||
public IEnumerable<RoleBindingModel> GetList(RoleSearchModel? model)
|
||||
{
|
||||
var context = new Database();
|
||||
if (model is null && string.IsNullOrWhiteSpace(model.Name))
|
||||
if (model is null && string.IsNullOrWhiteSpace(model?.Name))
|
||||
{
|
||||
return context.Roles.Select(r => r.GetBindingModel());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user