예제 #1
0
        /// <summary>
        /// Inserts the asynchronous.
        /// </summary>
        /// <param name="tourPackage">The region model.</param>
        /// <returns>
        /// InsertAsync
        /// </returns>
        /// <exception cref="ArgumentNullException">category</exception>
        public async Task <int> InsertAsync(TourPackageModel tourPackage)
        {
            if (tourPackage == null)
            {
                throw new ArgumentNullException("tourPackage");
            }

            return(await this.tourPackageRepository.InsertAsync(tourPackage));
        }
예제 #2
0
        /// <summary>
        /// Updates the asynchronous.
        /// </summary>
        /// <param name="tourPackage">The stylemodel.</param>
        /// <returns>
        /// UpdateAsync
        /// </returns>
        /// <exception cref="ArgumentNullException">category</exception>
        public async Task <int> UpdateAsync(TourPackageModel tourPackage)
        {
            if (tourPackage == null)
            {
                throw new ArgumentNullException("tourPackage");
            }

            this.tourPackageRepository.UpdateCompleteGraph(tourPackage, tourPackage.Id);
            return(await this.tourPackageRepository.SaveChangesAsync());
        }