public IEnumerable <PropertyFeatureDetailDTO> SelectByProperty(Guid propertyId) { PropertyFeatureRepository featureRepository = new PropertyFeatureRepository(Connector); return(Connector.ExecuteReader(selectByPropertyQuery, new Dictionary <string, object>() { { "Property", propertyId } }, reader => ReadFromDataReader(reader, featureRepository))); }
private PropertyFeatureDetailDTO ReadFromDataReader(IDataReader reader, PropertyFeatureRepository featureRepository) { byte featureId = (byte)reader["Feature"]; return(new PropertyFeatureDetailDTO() { Property = new PropertyDTO() { Id = (Guid)reader["Property"] }, Feature = new PropertyFeatureDTO() { Id = featureId, DisplayName = new LocalizationDictionary(featureRepository.GetDisplayName(featureId)) }, Value = reader["Value"] as string }); }