Skip to content

Commit

Permalink
Allow new sql commands IS NULL, IS NOT NULL and OR
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcelo Queiroz Sampaio de Oliveira Pinto Valiense committed Jun 18, 2024
1 parent 2942824 commit c587028
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions N.EntityFrameworkCore.Extensions/Extensions/LinqExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,11 @@ internal static string ToSqlPredicate<T>(this Expression<T> expression, params s
stringBuilder.Replace((string)expressionParam.GetPrivateFieldValue("DebugView"), parameters[i]);
i++;
}
stringBuilder.Replace("== null", "IS NULL");
stringBuilder.Replace("!= null", "IS NOT NULL");
stringBuilder.Replace("&&", "AND");
stringBuilder.Replace("==", "=");
stringBuilder.Replace("||", "OR");
stringBuilder.Replace("(System.Nullable`1[System.Int32])", "");
stringBuilder.Replace("(System.Int32)", "");
return stringBuilder.ToString();
Expand Down

0 comments on commit c587028

Please sign in to comment.