Пример #1
0
        public void Del_Test()
        {
            service.Add(new ShopOrder()
            {
                OrderId = 1, Price = 200
            });
            service.Add(new ShopOrder()
            {
                OrderId = 2, Price = 300
            });
            service.Add(new ShopOrder()
            {
                OrderId = 3, Price = 400
            });

            service.Del(new ShopOrder()
            {
                OrderId = 2, Price = 300
            });
            var check = service.Get(2);

            Assert.AreEqual(check, null);
        }
Пример #2
0
        public IHttpActionResult Remove(int id)
        {
            services.Del(services.Get(id));

            return(Ok());
        }