You should return the type
IkkosAdminPortalWebSite.Models.RecordDetails because the view is expecting model @model
IkkosAdminPortalWebSite.Models.RecordDetails but you are returning the type
IkkosAdminPortalWebSite.RecordDetail in the edit controller. So before you return the type set all the properties values of
IkkosAdminPortalWebSite.RecordDetail to
IkkosAdminPortalWebSite.Models.RecordDetails like below
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Edit(RecordDetails EditRecord)
{
if (ModelState.IsValid)
{
objList.Entry(EditRecord).State = System.Data.EntityState.Modified;
objList.SaveChanges();
return RedirectToAction("RecordDetails");
}
var viewModel=new IkkosAdminPortalWebSite.Models.RecordDetails();
view.Property1=EditRecord.Property1;
return View(viewModel);
}
Hope this helps