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(); }
public async Task<int> Insert(ReservationObjectDto dto) { UnitOfWork.Repository<ReservationObject>().Insert(dto.MapToEntity(new ReservationObject())); return await UnitOfWork.CommitAsync(); }