public ActionResult AddOrEditConsignee(int id = 0) { if (id == 0) { List <Area> alist = db.Areas.ToList(); ViewBag.data = alist; return(View(new VT_GetConsigneeWithArea_Result())); } else { List <Area> alist = db.Areas.ToList(); ViewBag.data = alist; return(View(db.VT_GetConsigneeWithArea(id).FirstOrDefault())); } }