Esempio n. 1
0
 public async Task<ActionResult> Edit(RSStock rSStock)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rSStock).State = System.Data.Entity.EntityState.Modified;
         await db.SaveChangesAsync();
         return RedirectToAction("Index");
     }
     return View(rSStock);
 }
Esempio n. 2
0
        public async Task<ActionResult> Create(RSStock rSStock)
        {
            if (ModelState.IsValid)
            {
                db.Stocks.Add(rSStock);
                await db.SaveChangesAsync();
                return RedirectToAction("Index");
            }

            return View(rSStock);
        }