public IActionResult Get(Guid id)
        {
            var data     = _attributeService.Get(id);
            var viewData = Mapper.Map <T, VM>(data);

            return(Ok(viewData));
        }
Exemplo n.º 2
0
        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));
            }
Exemplo n.º 3
0
 public AttributeModel Get(int id)
 {
     return(_attributeService.Get(id));
 }