From 25d1e7c6cf3108b69aafd5260810d5307ba79273 Mon Sep 17 00:00:00 2001 From: Nate Hitze Date: Wed, 14 Jul 2021 16:14:38 -0400 Subject: [PATCH 1/2] Update porting-cheat-sheet.md Added the only difference in functionality I've found so far, from #1164. --- porting-cheat-sheet.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/porting-cheat-sheet.md b/porting-cheat-sheet.md index 00f36919f7..1cb90fd9b4 100644 --- a/porting-cheat-sheet.md +++ b/porting-cheat-sheet.md @@ -31,6 +31,12 @@ For .NET Framework projects it may be necessary to include the following in your ``` +## Functionality Changes + +| System.Data.SqlClient | Microsoft.Data.SqlClient | +|--|--| +| Can use DateTime object as value for SqlParameter with type `DbType.Time`. | Must use TimeSpan object as value for SqlParameter with type `DbType.Time`. | + ## Contribute to this Cheat Sheet We would love the SqlClient community to help enhance this cheat sheet by contributing experiences and challenges faced when porting their applications. From 6c9adc4bee0d93773808209c573c7b2ad5329f75 Mon Sep 17 00:00:00 2001 From: Nate Hitze Date: Wed, 14 Jul 2021 20:20:31 -0400 Subject: [PATCH 2/2] Update porting-cheat-sheet.md Added DbType.Date note --- porting-cheat-sheet.md | 1 + 1 file changed, 1 insertion(+) diff --git a/porting-cheat-sheet.md b/porting-cheat-sheet.md index 1cb90fd9b4..3258e97776 100644 --- a/porting-cheat-sheet.md +++ b/porting-cheat-sheet.md @@ -36,6 +36,7 @@ For .NET Framework projects it may be necessary to include the following in your | System.Data.SqlClient | Microsoft.Data.SqlClient | |--|--| | Can use DateTime object as value for SqlParameter with type `DbType.Time`. | Must use TimeSpan object as value for SqlParameter with type `DbType.Time`. | +| Using DateTime object as value for SqlParameter with type `DbType.Date` would send date and time to SQL Server. | DateTime object's time components will be truncated when sent to SQL Server using `DbType.Date`. | ## Contribute to this Cheat Sheet