public async Task <ActionResult> DeleteConfirmed(int id) { Brand_tbl brand_tbl = await db.Brand_tbl.FindAsync(id); db.Brand_tbl.Remove(brand_tbl); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "br_id,br_name,br_creaetedby,br_createdat,br_updatedby,br_updatedat,br_isdeleted")] Brand_tbl brand_tbl) { if (ModelState.IsValid) { db.Entry(brand_tbl).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(brand_tbl)); }
public async Task <ActionResult> Create([Bind(Include = "br_id,br_name,br_creaetedby,br_createdat,br_updatedby,br_updatedat,br_isdeleted")] Brand_tbl brand_tbl) { if (ModelState.IsValid) { db.Brand_tbl.Add(brand_tbl); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(brand_tbl)); }
// GET: Brand/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Brand_tbl brand_tbl = await db.Brand_tbl.FindAsync(id); if (brand_tbl == null) { return(HttpNotFound()); } return(View(brand_tbl)); }