I am trying to insert multiple rows to database from webgrid,but on below line it is giving exception
DB.Customers.Add(i);
Can not convert From 'Account_App.Model.CustomerMV to 'AADatabaseLayer.Customer'
My Action
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult BulkData(List<CustomerMV> ci)
{
if (ModelState.IsValid)
{
foreach (var i in ci)
{
DB.Customers.Add(i);
}
DB.SaveChanges();
ViewBag.Message = "Data successfully saved!";
ModelState.Clear();
ci = new List<CustomerMV> { new CustomerMV { Name = "", Country = "" } };
}
return View(ci);
}