예제 #1
0
        public ShopStock Post(ShopStockDTO value)
        {
            ShopStock model = new ShopStock()
            {
                ComponentId = value.ComponentId,
                ShopId      = value.ShopId
            };

            return(IShopStockRepository.Create(model));
        }
예제 #2
0
        public ShopStock Put(int id, ShopStockDTO value)
        {
            ShopStock model = IShopStockRepository.Get(id);

            if (value.ComponentId != 0)
            {
                model.ComponentId = value.ComponentId;
            }
            if (value.ComponentId != 0)
            {
                model.ComponentId = value.ComponentId;
            }
            return(IShopStockRepository.Update(model));
        }