private async Task <ViewModels.RolesWithData <T> > GetModel <T>(T data) { var model = new ViewModels.RolesWithData <T> { Data = data }; await CheckModel(model); return(model); }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously protected override async Task CheckModel <TData>(ViewModels.RolesWithData <TData> model) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { model.Roles = _roles.Roles.OrderBy(_r => _r.Name).Select(_r => _r.Name).ToArray(); }
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously protected virtual async Task CheckModel <TData>(ViewModels.RolesWithData <TData> model) #pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously { }