//get user by ID public StockPurch GetStockById(int id) { StockPurch stock = _db.StockPurches.FirstOrDefault(s => s.PurchesItemId == id); return(stock); }
//Update public string Update(StockPurch objStock) { _db.StockPurches.Update(objStock); _db.SaveChanges(); return("Update successfully"); }
//Insert public string Create(StockPurch objStock) { _db.StockPurches.Add(objStock); _db.SaveChanges(); return("save successfully"); }