예제 #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");
        }