Exemplo n.º 1
0
        public bool Attach(List <int> list, int cityId)
        {
            //Get the city
            var city = cityRepository.GetById(cityId);

            if (city != null)
            {
                //add the times to the city (object of timespan)
                return(cityRepository.AddTimeSpans(timeSpanService.GetByIds(list), city));
            }
            return(false);
        }