public ShopStock Post(ShopStockDTO value) { ShopStock model = new ShopStock() { ComponentId = value.ComponentId, ShopId = value.ShopId }; return(IShopStockRepository.Create(model)); }
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)); }