Пример #1
0
        //get user by ID

        public StockPurch GetStockById(int id)
        {
            StockPurch stock = _db.StockPurches.FirstOrDefault(s => s.PurchesItemId == id);

            return(stock);
        }
Пример #2
0
 //Update
 public string Update(StockPurch objStock)
 {
     _db.StockPurches.Update(objStock);
     _db.SaveChanges();
     return("Update successfully");
 }
Пример #3
0
        //Insert

        public string Create(StockPurch objStock)
        {
            _db.StockPurches.Add(objStock);
            _db.SaveChanges();
            return("save successfully");
        }