public bool Add(TourPlanListDTO tourPlan) { return(_tourPlanRepository.Add(new TourPlanList() { Day = tourPlan.Day, DayDetail = tourPlan.DayDetail, DayTitle = tourPlan.DayTitle, TourId = tourPlan.TourId })); }
public bool Update(TourPlanListDTO tourPlan) { var t = _tourPlanRepository.First(x => x.Id == tourPlan.Id); if (t != null) { t.Day = tourPlan.Day; t.DayTitle = tourPlan.DayTitle; t.DayDetail = tourPlan.DayDetail; t.TourId = tourPlan.TourId; return(_tourPlanRepository.Update(t)); } return(false); }