예제 #1
0
 public bool Insert(TourCategoriesDTO data)
 {
     return(_tourCategoriesRepository.Add(new TourCategories()
     {
         CategoriesId = data.CategoriesId,
         TourId = data.TourId
     }));
 }
예제 #2
0
        public bool Delete(TourCategoriesDTO data)
        {
            var category = _tourCategoriesRepository.First(x => x.Id == data.Id);

            if (category != null)
            {
                _tourCategoriesRepository.Delete(category);
                return(true);
            }
            else
            {
                return(false);
            }
        }