Exemplo n.º 1
0
    /// <summary>
    /// A DbEntityValidationException extension method that formates validation errors to string.
    /// </summary>
    public static string DbEntityValidationExceptionToString(this DbEntityValidationException e)
    {
        var validationErrors = e.DbEntityValidationResultToString();
        var exceptionMessage = string.Format("{0}Validation errors:{1}{0}{2}", Environment.NewLine, validationErrors, e.ExceptionToString());

        return(exceptionMessage);
    }
Exemplo n.º 2
0
 /// <summary>
 /// A DbEntityValidationException extension method that formates validation errors to string.
 /// </summary>
 public static string DbEntityValidationExceptionToString(this DbEntityValidationException e)
 {
     return(e.DbEntityValidationResultToString());
 }