public async Task <ActionResult> DeleteConfirmed(int id) { Lepinsttp lepinsttp = await db.Lepinsttps.FindAsync(id); db.Lepinsttps.Remove(lepinsttp); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Code,NameEN,NameKZ,NameRU")] Lepinsttp lepinsttp) { if (ModelState.IsValid) { db.Entry(lepinsttp).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(lepinsttp)); }
public async Task <ActionResult> Create([Bind(Include = "Id,Code,NameEN,NameKZ,NameRU")] Lepinsttp lepinsttp) { if (ModelState.IsValid) { db.Lepinsttps.Add(lepinsttp); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(lepinsttp)); }
public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Lepinsttp lepinsttp = await db.Lepinsttps.FindAsync(id); if (lepinsttp == null) { return(HttpNotFound()); } return(View(lepinsttp)); }