コード例 #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");
        }