SqlServerDbFunctionsExtensions.IsDate(DbFunctions, String) Method

Definition

Validate if the given string is a valid date. Corresponds to SQL Server's ISDATE('date').

C#
public static bool IsDate (this Microsoft.EntityFrameworkCore.DbFunctions _, string expression);

Parameters

_
DbFunctions

The DbFunctions instance.

expression
String

Expression to validate

Returns

true for valid date and false otherwise.

Remarks

See Database functions, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.

Applies to

Toode Versioonid
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0