Export (0) Print
Expand All

System.DateTimeOffset Methods

Once mapped in the object model or external mapping file, LINQ to SQL allows you to call most of the System.DateTimeOffset methods, operators, and properties from within your LINQ to SQL queries.

The only methods not supported are those inherited from System.Object that do not make sense in the context of LINQ to SQL queries, such as: Finalize, GetHashCode, GetType, and MemberwiseClone. These methods are not supported because LINQ to SQL cannot translate them for execution on the SQL Server.

Note Note

The common language runtime (CLR) System.DateTimeOffset structure, and the ability to map it to a SQL DATETIMEOFFSET column with LINQ to SQL, requires the .NET Framework 3.5 SP1 or beyond. The SQL DATETIMEOFFSET column is only available in Microsoft SQL Server 2008 and beyond.

In addition to the methods offered by the DateTimeOffset structure, LINQ to SQL offers the methods listed in the following table from the System.Data.Linq.SqlClient.SqlMethods class for working with date and time.

Show:
© 2015 Microsoft