SqlMethods 类

定义

提供与 SQL Server 函数对应的方法。Provides methods that correspond to SQL Server functions. SqlMethods 类中的方法仅在 LINQ to SQL 查询中受支持。Methods in the SqlMethods class are only supported in LINQ to SQL queries.

public ref class SqlMethods abstract sealed
public static class SqlMethods
type SqlMethods = class
Public Class SqlMethods
继承
SqlMethods

方法

DateDiffDay(DateTime, DateTime)

对两个不可以为 null 的日期之间的日期边界进行计数。Counts the number of day boundaries between two non-nullable dates.

DateDiffDay(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的日期边界进行计数。Counts the number of day boundaries between two non-nullable dates.

DateDiffDay(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的日期边界进行计数。Counts the number of day boundaries between two nullable dates.

DateDiffDay(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的日期边界进行计数。Counts the number of day boundaries between two nullable dates.

DateDiffHour(DateTime, DateTime)

对两个不可以为 null 的日期之间的小时边界进行计数。Counts the number of hour boundaries between two non-nullable dates.

DateDiffHour(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的小时边界进行计数。Counts the number of hour boundaries between two non-nullable dates.

DateDiffHour(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的小时边界进行计数。Counts the number of hour boundaries between two nullable dates.

DateDiffHour(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的小时边界进行计数。Counts the number of hour boundaries between two nullable dates.

DateDiffMicrosecond(DateTime, DateTime)

对两个不可为 null 的日期之间的微秒边界进行计数。Counts the number of microsecond boundaries between two non-nullable dates.

DateDiffMicrosecond(DateTimeOffset, DateTimeOffset)

对两个不可为 null 的日期之间的微秒边界进行计数。Counts the number of microsecond boundaries between two non-nullable dates.

DateDiffMicrosecond(Nullable<DateTime>, Nullable<DateTime>)

对两个可为 null 的日期之间的微秒边界进行计数。Counts the number of microsecond boundaries between two nullable dates.

DateDiffMicrosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可为 null 的日期之间的微秒边界进行计数。Counts the number of microsecond boundaries between two nullable dates.

DateDiffMillisecond(DateTime, DateTime)

对两个不可以为 null 的日期之间的毫秒边界进行计数。Counts the number of millisecond boundaries between two non-nullable dates.

DateDiffMillisecond(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的毫秒边界进行计数。Counts the number of millisecond boundaries between two non-nullable dates.

DateDiffMillisecond(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的毫秒边界进行计数。Counts the number of millisecond boundaries between two nullable dates.

DateDiffMillisecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的毫秒边界进行计数。Counts the number of millisecond boundaries between two nullable dates.

DateDiffMinute(DateTime, DateTime)

对两个不可以为 null 的日期之间的分钟边界进行计数。Counts the number of minute boundaries between two non-nullable dates.

DateDiffMinute(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的分钟边界进行计数。Counts the number of minute boundaries between two non-nullable dates.

DateDiffMinute(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的分钟边界进行计数。Counts the number of minute boundaries between two nullable dates.

DateDiffMinute(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的分钟边界进行计数。Counts the number of minute boundaries between two nullable dates.

DateDiffMonth(DateTime, DateTime)

对两个不可以为 null 的日期之间的月份边界进行计数。Counts the number of month boundaries between two non-nullable dates.

DateDiffMonth(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的月份边界进行计数。Counts the number of month boundaries between two non-nullable dates.

DateDiffMonth(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的月份边界进行计数。Counts the number of month boundaries between two nullable dates.

DateDiffMonth(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的月份边界进行计数。Counts the number of month boundaries between two nullable dates.

DateDiffNanosecond(DateTime, DateTime)

对两个不可为 null 的日期之间的毫微秒边界进行计数。Counts the number of nanosecond boundaries between two non-nullable dates.

DateDiffNanosecond(DateTimeOffset, DateTimeOffset)

对两个不可为 null 的日期之间的毫微秒边界进行计数。Counts the number of nanosecond boundaries between two non-nullable dates.

DateDiffNanosecond(Nullable<DateTime>, Nullable<DateTime>)

对两个可为 null 的日期之间的毫微秒边界进行计数。Counts the number of nanosecond boundaries between two nullable dates.

DateDiffNanosecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可为 null 的日期之间的毫微秒边界进行计数。Counts the number of nanosecond boundaries between two nullable dates.

DateDiffSecond(DateTime, DateTime)

对两个不可以为 null 的日期之间的秒边界进行计数。Counts the number of second boundaries between two non-nullable dates.

DateDiffSecond(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的秒边界进行计数。Counts the number of second boundaries between two non-nullable dates.

DateDiffSecond(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的秒边界进行计数。Counts the number of second boundaries between two nullable dates.

DateDiffSecond(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的秒边界进行计数。Counts the number of second boundaries between two nullable dates.

DateDiffYear(DateTime, DateTime)

对两个不可以为 null 的日期之间的年份边界进行计数。Counts the number of year boundaries between two non-nullable dates.

DateDiffYear(DateTimeOffset, DateTimeOffset)

对两个不可以为 null 的日期之间的年份边界进行计数。Counts the number of year boundaries between two non-nullable dates.

DateDiffYear(Nullable<DateTime>, Nullable<DateTime>)

对两个可以为 null 的日期之间的年份边界进行计数。Counts the number of year boundaries between two nullable dates.

DateDiffYear(Nullable<DateTimeOffset>, Nullable<DateTimeOffset>)

对两个可以为 null 的日期之间的年份边界进行计数。Counts the number of year boundaries between two nullable dates.

Like(String, String)

确定特定字符串是否与指定模式相匹配。Determines whether a specific character string matches a specified pattern. 目前只有 LINQ to SQL 查询支持此方法。This method is currently only supported in LINQ to SQL queries.

Like(String, String, Char)

确定特定字符串是否与指定模式相匹配。Determines whether a specific character string matches a specified pattern. 目前只有 LINQ to SQL 查询支持此方法。This method is currently only supported in LINQ to SQL queries.

适用于