public IEnumerable <Product> GetStock()
        {
            var stockNumbersDetail = _cache.GetObject <List <Product> >(() => Console.WriteLine("Appliance distributor requested data."));

            return(stockNumbersDetail);
        }
Example #2
0
        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));
        }
Example #3
0
        public IEnumerable <Order> GetOrders()
        {
            var ordersCache = _cache.GetObject <IEnumerable <Order> >(() => Console.WriteLine("Order manager requested data."));

            return(ordersCache);
        }