public IEnumerable <Product> GetStock() { var stockNumbersDetail = _cache.GetObject <List <Product> >(() => Console.WriteLine("Appliance distributor requested data.")); return(stockNumbersDetail); }
public User GetUser(User user) { var userCache = _cache.GetObject <List <User> >(() => Console.WriteLine("User manager requested data.")); return(userCache.FirstOrDefault(u => u.Id == user.Id)); }
public IEnumerable <Order> GetOrders() { var ordersCache = _cache.GetObject <IEnumerable <Order> >(() => Console.WriteLine("Order manager requested data.")); return(ordersCache); }