Exemple #1
0
        public void Put(int id, [FromBody] StockMp newObj)
        {
            var oldObj = db.StockMp.Find(id);

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