コード例 #1
0
        public async Task<GetLandPropertyOutput> GetLandProperty(GetLandPropertyInput input)
        {
            GetLandPropertyOutput output = new GetLandPropertyOutput();

            if (input.LandPropertyId > 0)
            {
                output.SingleLandProperty = Mapper.Map<LandPropertyDto>(await _landPropertyRepository.GetAsync(input.LandPropertyId));
            }
            else
            {
                output.SingleLandProperty = Mapper.Map<LandPropertyDto>(new LandProperty());
            }

            return output;
        }
コード例 #2
0
        public async Task<GetLandPropertyOutput> GetLandProperties()
        {
            GetLandPropertyOutput output = new GetLandPropertyOutput();

            try
            {
                output.LandPropertiesList = Mapper.Map<List<LandPropertyDto>>(await _landPropertyRepository.GetAllListAsync());
            }
            catch (Exception e)
            {                
                throw e;
            }            

            return output;
        }