public bool Insert(TourCategoriesDTO data) { return(_tourCategoriesRepository.Add(new TourCategories() { CategoriesId = data.CategoriesId, TourId = data.TourId })); }
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); } }