Пример #1
0
        public async Task <IActionResult> EditSchedule(string id)
        {
            var schedule = await this.SchedulerWorkData.Schedules.SingleOrDefaultAsync(s => s.Id == id, i => i.Include(x => x.Employee));

            if (schedule == null)
            {
                return(NotFound($"Schedule not found. Please try again and if the problem persist contact the administrator"));
            }

            return(View(await ScheduleViewModel.CreateForEditAsync(schedule, this.ScheduleSevice, this.Mapper)));
        }