public async Task <TaskSchedulesResult> GetItemsAsync(string SessionKey, int CompanyId) { return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token => { var result = (await taskScheduleProcessor.GetAsync(new TaskScheduleSearch { CompanyId = CompanyId, }, token)).ToList(); return new TaskSchedulesResult { ProcessResult = new ProcessResult { Result = true }, TaskSchedules = result, }; }, logger)); }
public async Task <ActionResult <IEnumerable <TaskSchedule> > > GetItems(TaskScheduleSearch option, CancellationToken token) => (await taskScheduleProcessor.GetAsync(option, token)).ToArray();