public async Task DeleteTurnoverWithDays(int id)
        {
            ////Начинаем блядь КВН
            using (var transaction = new TransactionScope(asyncFlowOption: TransactionScopeAsyncFlowOption.Enabled))
            {
                var sqlRTurnovers = new TurnoversRepoisitory(_logger);
                var sqlRDays      = new DayOfRoutesRepoisitory(_logger);
                var currentDays   = await sqlRDays.DaysByTurnoverId(id);

                foreach (var currentDay in currentDays)
                {
                    await sqlRDays.Delete(currentDay.Id);
                }
                await sqlRTurnovers.Delete(id);

                transaction.Complete();
            }
        }
        public async Task <TurnoverWithDays> UpdateTurnoverWithDays(TurnoverWithDays input)
        {
            //Начинаем блядь КВН
            using (var transaction = new TransactionScope(asyncFlowOption: TransactionScopeAsyncFlowOption.Enabled))
            {
                var sqlRTurnovers = new TurnoversRepoisitory(_logger);
                var sqlRDays      = new DayOfRoutesRepoisitory(_logger);

                var turnover = await sqlRTurnovers.Update(_mapper.Map <TurnoverWithDays, Turnover>(input));

                var result      = _mapper.Map <Turnover, TurnoverWithDays>(turnover);
                var currentDays = await sqlRDays.DaysByTurnoverId(input.Id);

                result.Days = new List <DayOfWeek>();
                foreach (var inputDay in input.Days)
                {
                    if (currentDays.Any(x => x.Day.Equals(inputDay)))
                    {
                        result.Days.Add(inputDay);
                        continue;
                    }
                    var day = await sqlRDays.Add(new DayOfRoute { TurnoverId = input.Id, Day = inputDay });

                    result.Days.Add(day.Day);
                }

                foreach (var currentDay in currentDays)
                {
                    if (!input.Days.Any(x => x.Equals(currentDay.Day)))
                    {
                        await sqlRDays.Delete(currentDay.Id);
                    }
                }

                transaction.Complete();
                return(result);
            }
        }