Пример #1
0
        public async Task <WorkblockDto> AddAsync(WorkblockDto dto)
        {
            var workblock = WorkblockMapper.toDomain(dto);

            await this._repo.AddAsync(workblock);

            await this._unitOfWork.CommitAsync();

            return(WorkblockMapper.toDTO(workblock));
        }
Пример #2
0
 public static Workblock toDomain(WorkblockDto dto)
 {
     return(new Workblock(dto.Key, dto.VehicleDutyKey, dto.ListOfTrips, dto.StartTime, dto.EndTime));
 }