public List <AttributeType> GetTypes() { return(ExecuteFaultHandledOperation(() => { List <AttributeType> attribute_types = _cache.Get(CacheKeys.AttributeTypes) as List <AttributeType>; if (attribute_types == null) { Log.Debug("AttributeTypeRepository GetAll called"); attribute_types = new List <AttributeType>(); var attrib_type_data = _repo_attr_type.GetAll(); foreach (AttributeTypeData account_type in attrib_type_data) { attribute_types.Add(_attr_type_es.Map(account_type)); } _cache.Set(CacheKeys.AttributeTypes, attribute_types); Log.Debug("AttributeTypeRepository GetAll complete"); } return attribute_types; })); }
public async Task <IEnumerable <AttributeType> > GetAllAttributeTypeAsync() => _attributeTypeEntityService.Map(await _listRepository.GetAllAttributeTypesAsync());