/// <summary> /// Inserts the asynchronous. /// </summary> /// <param name="tourPackageNight">The tour package night.</param> /// <returns> /// InsertAsync /// </returns> /// <exception cref="ArgumentNullException">category</exception> public async Task <int> SavePackageNights(TourPackageNightModel tourPackageNight) { if (tourPackageNight == null) { throw new ArgumentNullException("tourPackage"); } return(await this.packagenightRepository.InsertAsync(tourPackageNight)); }
/// <summary> /// Deletes the asynchronous. /// </summary> /// <param name="tourPackage">The category.</param> /// <returns> /// DeleteAsync /// </returns> /// <exception cref="ArgumentNullException">category</exception> public async Task <int> DeleteAsync(TourPackageNightModel tourPackage) { if (tourPackage == null) { throw new ArgumentNullException("hotelcategory"); } return(await this.tourPackageNightRepository.DeleteAsync(tourPackage)); }
/// <summary> /// Updates the asynchronous. /// </summary> /// <param name="tourpackageNight">The tourpackage night.</param> /// <returns> /// UpdateAsync /// </returns> /// <exception cref="ArgumentNullException">category</exception> public async Task <int> UpdateTourPackageNightAsync(TourPackageNightModel tourpackageNight) { if (tourpackageNight == null) { throw new ArgumentNullException("tourpackageNight"); } this.packagenightRepository.UpdateCompleteGraph(tourpackageNight, tourpackageNight.Id); return(await this.packagenightRepository.SaveChangesAsync()); }
/// <summary> /// Updates the tour package night rates asynchronous. /// </summary> /// <param name="tourpackageNight">The tourpackage night.</param> /// <returns> /// UpdateTourPackageNightRatesAsync /// </returns> /// <exception cref="ArgumentNullException">tourpackageNight</exception> public async Task <int> UpdateTourPackageNightRatesAsync(TourPackageNightModel tourpackageNight) { if (tourpackageNight == null) { throw new ArgumentNullException("tourpackageNight"); } return(await this.packagenightRepository.UpdateAsync(tourpackageNight)); //// return await this.packagenightRepository.SaveChangesAsync(); }
/// <summary> /// Inserts the asynchronous. /// </summary> /// <param name="tourpackageNight">The region model.</param> /// <returns> /// InsertAsync /// </returns> /// <exception cref="ArgumentNullException">category</exception> public async Task <int> InsertAsync(TourPackageNightModel tourpackageNight) { try { if (tourpackageNight == null) { throw new ArgumentNullException("tourpackageNight"); } return(await this.tourPackageNightRepository.InsertAsync(tourpackageNight)); } catch (Exception ex) { throw ex; } }
/// <summary> /// Set entity status deleted /// </summary> /// <param name="entity">entity</param> public void RemoveTourPackageNightModelEntity(TourPackageNightModel entity) { this.packagenightRepository.RemoveToContext(entity); }