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); }
public async Task<ActionResult> Create(RSStock rSStock) { if (ModelState.IsValid) { db.Stocks.Add(rSStock); await db.SaveChangesAsync(); return RedirectToAction("Index"); } return View(rSStock); }