if (tran != null)
{
tran.Commit();
tran.Dispose();
}
}
catch (DbEntityValidationException dbEx)
{
foreach (var validationErrors in dbEx.EntityValidationErrors)
{
foreach (var validationError in validationErrors.ValidationErrors)
{
var xyz = string.Format("Property: {0} Error: {1}", validationError.PropertyName,validationError.ErrorMessage);
abc = !string.IsNullOrEmpty(abc) ? xyz + " HHH " : xyz;
// Trace.TraceInformation("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);
}
}
}
{
tran.Commit();
tran.Dispose();
}
}
catch (DbEntityValidationException dbEx)
{
foreach (var validationErrors in dbEx.EntityValidationErrors)
{
foreach (var validationError in validationErrors.ValidationErrors)
{
var xyz = string.Format("Property: {0} Error: {1}", validationError.PropertyName,validationError.ErrorMessage);
abc = !string.IsNullOrEmpty(abc) ? xyz + " HHH " : xyz;
// Trace.TraceInformation("Property: {0} Error: {1}", validationError.PropertyName, validationError.ErrorMessage);
}
}
}
No comments:
Post a Comment