public async Task <TravelPlanStatusDto> GetStatusAsync(TravelPlanStatusEnum status)
        {
            var tpStatus = await _dbContext.TravelPlanStatuses.Where((tps) => tps.UniqStatus == status).FirstOrDefaultAsync();

            var tpStatusDto = new TravelPlanStatusDto()
            {
                Description = tpStatus.Description,
                UniqStatus  = tpStatus.UniqStatus
            };

            return(tpStatusDto);
        }
Exemplo n.º 2
0
        public async Task <TravelPlanStatusDto> GetStatusAsync(TravelPlanStatusEnum status)
        {
            var tpStatus = await _travelPlanStatusRepository.GetStatusAsync(status);

            var tpStatusDto = new TravelPlanStatusDto()
            {
                Description = tpStatus.Description,
                UniqStatus  = tpStatus.UniqStatus
            };

            return(tpStatusDto);
        }
        public async Task <TravelPlanStatus> GetStatusAsync(TravelPlanStatusEnum status)
        {
            var tpStatus = await _dbContext.TravelPlanStatuses.Where((tps) => tps.UniqStatus == status).FirstOrDefaultAsync();

            return(tpStatus);
        }