public ActionResult Create(Company company) { if (ModelState.IsValid) { db.Company.Add(company); db.SaveChanges(); return RedirectToAction("Index"); } return View(company);// PartialView("_CreateCompanyPartial", company); }
public string FullName(Company comp) { return comp.CompanyName + " " + comp.Country; }
public ActionResult Edit(Company company) { if (ModelState.IsValid) { db.Entry(company).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index", "Companies"); } return View(company);// PartialView("_EditCompanyPartial", company); }