As i have created Entity framework the table have been selected but if i want to select multiple table the error is occuring.
Used below code to get the error
try
{
Reason lat = new Reason();
// TODO: Add insert logic here
lat.Desc = Lat.Desc;
Obj.Reasons.Add(lat);
Obj.SaveChanges();
}
catch (DbEntityValidationException ex)
{
foreach (var entityValidationErrors in ex.EntityValidationErrors)
{
foreach (var validationError in entityValidationErrors.ValidationErrors)
{
Response.Write("Property: " + validationError.PropertyName + " Error: " + validationError.ErrorMessage);
}
}
}
return "Reason Added Successfully";
}