public IActionResult Details(string id) { Product product; var obj = cache.StringGet(id); if (obj.HasValue == true) { product = JsonConvert.DeserializeObject <Product>(obj); } else { product = _repositoryManagement.Get <Product>(id); product.counter = product.counter + 1; _repositoryManagement.UpdateInfo <Product>(id, product); } return(Ok(product)); }
public T Get <T>(string Id) { var st = _RepositoryManagement.Get <T>(Id); return(st); }