示例#1
0
        public void Update(Product obj)
        {
            var result = 0;

            using (var context = new DbContext())
            {
                _repository = new ProductRepository(context);

                result = _repository.Update(obj);

                if (result > 0)
                {
                    _view.OnUpdated(obj);
                }
                else
                {
                    _view.OnFailed("Data produk gagal diupdate");
                }
            }
        }