fix role storage
This commit is contained in:
parent
513f57ec72
commit
f122886b7e
@ -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