public async Task <CheckDetailDTO> EditAsync([FromBody] CheckDetailDTO value)
        {
            Check check;

            if (value.ID > 0)
            {
                check = await _checks.GetDetails(value.ID);
            }
            else
            {
                check = new Check
                {
                    Schedules = new List <CheckSchedule>()
                };
                _checks.Add(check);
            }

            _mapper.Map(value, check);

            await _checks.SaveChangesAsync();

            await _manager.UpdateSchedule(check);

            return(await GetDetailsAsync(check.ID));
        }
Beispiel #2
0
 public async Task SaveChangesAsync()
 {
     await _checks.SaveChangesAsync();
 }