fix role storage

This commit is contained in:
mfnefd 2024-06-22 18:42:35 +04:00
parent 513f57ec72
commit f122886b7e

View File

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