public IActionResult Get(Guid id) { var data = _attributeService.Get(id); var viewData = Mapper.Map <T, VM>(data); return(Ok(viewData)); }
public async Task <IActionResult> Get() { if (await _cache.GetRecordAsync <IEnumerable <Attribute> >(typeof(Attribute).Name + "Get") is null) { var result = await _attributeService.Get(); await _cache.SetRecordAsync <IEnumerable <Attribute> >(typeof(Attribute).Name + "Get", result); return(new JsonResult(result)); }
public AttributeModel Get(int id) { return(_attributeService.Get(id)); }