First, find out what are the errors you are getting. Then come back with the result. This piece of code might help you finding out the errors:
try
{
}
catch (DbEntityValidationException ex)
{
StringBuilder sbError = new StringBuilder();
foreach (var objError in ex.EntityValidationErrors)
{
sbError.AppendFormat("Entity Type \"{0}\" in state \"{1}\" has the following errors:", objError.Entry.Entity.GetType().Name, objError.Entry.State);
foreach (var validationError in objError.ValidationErrors)
{
sbError.AppendFormat("Property: \"{0}\", Error: \"{1}\"",
validationError.PropertyName, validationError.ErrorMessage);
}
}
string validationErrors = sbError.ToString();
}