public Result <List <DayInfo> > GetInfoFreeTimeInMonthOrderTemplate(int Year, int Month, int OrderTemplateId) { var date = new DateTime(Year, Month, 1); var list = _dayInfo.GetMonth(date); var ordertempl = _orderTemplService.GetById(OrderTemplateId); if (list.status) { if (ordertempl.status) { return(_orderServices.CheckMonthIfFree(list.value, date, ordertempl.value.ExpectedTime.Value)); } else { list.info = "nieprawidłowy Order Template ID"; } } //return with error because status=false; return(list); }