Esempio n. 1
0
        public void Put(int id, [FromBody] StockPr newObj)
        {
            var oldObj = db.StockPr.Find(id);

            if (oldObj == null)
            {
                return;
            }
            newObj.Id = oldObj.Id;
            db.Entry(oldObj).CurrentValues.SetValues(newObj);
            db.SaveChanges();
        }
Esempio n. 2
0
 public void Post(StockPr sync)
 {
     db.StockPr.Add(sync);
     db.SaveChanges();
 }