public bool AddTour(ATour tour) { using (DataClassesTourGuideDataContext dc = new DataClassesTourGuideDataContext()) { Tour newTour = new Tour(); newTour.TourName = tour.TourName; newTour.TourPrice = tour.TourPrice; newTour.TourLocation = tour.TourLocation; newTour.TourArea = tour.TourArea; newTour.TourCategory = tour.TourCategory; newTour.TourDuration = (short)tour.TourDuration; newTour.TourDescription = tour.TourDescription; newTour.MinReg = (byte)tour.MinReg; newTour.MaxReg = (byte)tour.MaxReg; newTour.TourID = System.Guid.NewGuid(); dc.Tours.InsertOnSubmit(newTour); dc.SubmitChanges(); return true; } }
partial void DeleteTour(Tour instance);
partial void UpdateTour(Tour instance);
partial void InsertTour(Tour instance);