Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
        /// <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));
        }
Ejemplo n.º 3
0
        /// <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());
        }
Ejemplo n.º 4
0
        /// <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();
        }
Ejemplo n.º 5
0
        /// <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;
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Set entity status deleted
 /// </summary>
 /// <param name="entity">entity</param>
 public void RemoveTourPackageNightModelEntity(TourPackageNightModel entity)
 {
     this.packagenightRepository.RemoveToContext(entity);
 }