Exemplo n.º 1
0
        public async Task <CountResult> DeleteAsync(string SessionKey, int CompanyId, DateTime[] Holiday)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var holidays = Holiday.Select(x => new HolidayCalendar {
                    CompanyId = CompanyId, Holiday = x
                }).ToArray();
                var result = await holidaycalendarProcessor.DeleteAsync(holidays, token);;

                return new CountResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    Count = result,
                };
            }, logger));
        }
Exemplo n.º 2
0
 public async Task <ActionResult <int> > Delete(IEnumerable <HolidayCalendar> holidays, CancellationToken token)
 => await holidaycalendarProcessor.DeleteAsync(holidays, token);