DocSas/PropertyService.Domain/ModelView/property/PropertyProvider.cs
/// <summary>
/// get propety hour as an asynchronous operation.
/// </summary>
/// <param name="propertyInfoId">The property information identifier.</param>
/// <returns>Task&lt;DSCResponse&gt;.</returns>
get propety hour as an asynchronous operation.
get propety hour as an asynchronous operation .
public async Task<DSCResponse> GetPropetyHourAsync(Guid propertyInfoId)
        {
            var msg = new Dictionary<string, string>();
            var response = new DSCResponse();
            HourVM hourView= new HourVM();
            var hourEntity = await _hourRepo.GetAsync(x => x.PropertyInformationId == propertyInfoId);
            if (hourEntity.Any())
            {
                var hourVm = _mapper.Map<IEnumerable<OperationHourVM>>(hourEntity);
                hourView.Hours = hourVm.ToList();
                response.ResponseData = hourView;
            }
            response.ErrorMessage = msg;
            return response;
        }
public async Task < DSCResponse > GetPropetyHourAsync ( Guid propertyInfoId ) { var msg = new Dictionary < string , string > ( ) ; var response = new DSCResponse ( ) ; HourVM hourView = new HourVM ( ) ; var hourEntity = await _hourRepo . GetAsync ( x => x . PropertyInformationId == propertyInfoId ) ; if ( hourEntity . Any ( ) ) { var hourVm = _mapper . Map < IEnumerable < OperationHourVM > > ( hourEntity ) ; hourView . Hours = hourVm . ToList ( ) ; response . ResponseData = hourView ; } response . ErrorMessage = msg ; return response ; }
get propety hour as an asynchronous operation.
get propety hour as an asynchronous operation .
None
propertyInfoId
Guid
The property information identifier.
The property information identifier .