コード例 #1
0
        public async Task <IHttpActionResult> Save(ConfreneceRoom room)
        {
            PopulateMetaData(room);
            _uow.RoomRepository.Save(room);
            await _uow.SaveAsync();

            return(Ok(room));
        }
コード例 #2
0
        public async Task <IHttpActionResult> Save(Booking booking)
        {
            PopulateMetaData(booking);
            await _uow.BookingRepository.SaveBooking(booking);

            await _uow.SaveAsync();

            return(Ok(booking));
        }
コード例 #3
0
        /// <summary>
        /// Сохранение изменений БД
        /// </summary>
        public async Task <(bool, string, int)> SaveChangesAsync()
        {
            try
            {
                var result = await _instanceDb.SaveAsync();

                return(true, string.Empty, result);
            }
            catch (Exception e)
            {
                return(false, e.Message, 0);
            }
        }