public int Delete(Product t)
 {
     return _products.Remove(t) ? 1 : 0;
 }
        public int Update(Product t)
        {
            var product = _products.SingleOrDefault(p => p.Id == t.Id);

            var success = _products.Remove(product);

            if (success)
            {
                return 0;
            }

            _products.Add(t);

            return 1;
        }
        public Product Create(Product t)
        {
            _products.Add(t);

            return t;
        }