コード例 #1
0
		public async Task<int> Update(int id, ReservationObjectDto dto)
		{
			ReservationObject reservation = await UnitOfWork.Repository<ReservationObject>().GetByIDAsync(id);
			UnitOfWork.Repository<ReservationObject>().Update(dto.MapToEntity(reservation));
			return await UnitOfWork.CommitAsync();
		}
コード例 #2
0
		public async Task<int> Insert(ReservationObjectDto dto)
		{

			UnitOfWork.Repository<ReservationObject>().Insert(dto.MapToEntity(new ReservationObject()));
			return await UnitOfWork.CommitAsync();
		}