Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<docs>
<members name="SqlDbTypeExtensions">
<SqlDbTypeExtensions>
<summary>Extensions for SqlDbType.</summary>
<remarks>
<format type="text/markdown">
<![CDATA[

## Remarks
The <xref:Microsoft.Data.SqlDbTypeExtensions> class provides <xref:System.Data.SqlDbType> enums which will be added. These are meant to be used by applications which cannot leverage the enums in <xref:System.Data.SqlDbType> available in newer .NET runtime versions.

]]>
</format>
</remarks>
</SqlDbTypeExtensions>
<SqlJson name="default">
Comment thread
saurabh500 marked this conversation as resolved.
<summary>Gets the <see cref="T:System.Data.SqlDbType" /> enum value for JSON datatype.</summary>
<returns>
<see cref="T:System.Data.SqlDbType" /> enum value for JSON datatype.
</returns>
</SqlJson>
</members>
</docs>
1 change: 1 addition & 0 deletions src/Microsoft.Data.SqlClient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data", "Microsoft.Data", "{908C7DD3-C999-40A6-9433-9F5ACA7C36F5}"
ProjectSection(SolutionItems) = preProject
..\doc\snippets\Microsoft.Data\OperationAbortedException.xml = ..\doc\snippets\Microsoft.Data\OperationAbortedException.xml
..\doc\snippets\Microsoft.Data\SqlDbTypeExtensions.xml = ..\doc\snippets\Microsoft.Data\SqlDbTypeExtensions.xml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.Data.Sql", "Microsoft.Data.Sql", "{0CE216CE-8072-4985-B248-61F0D0BE9C2E}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
// NOTE: The current Microsoft.VSDesigner editor attributes are implemented for System.Data.SqlClient, and are not publicly available.
// New attributes that are designed to work with Microsoft.Data.SqlClient and are publicly documented should be included in future.

using System;

[assembly: System.CLSCompliant(true)]
namespace Microsoft.Data
{
Expand All @@ -15,7 +13,15 @@ public sealed partial class OperationAbortedException : System.SystemException
{
internal OperationAbortedException() { }
}

/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlDbTypeExtensions/*' />
public static class SqlDbTypeExtensions
{
/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlJson[@name="default"]' />
public const System.Data.SqlDbType Json = (System.Data.SqlDbType)35;
}
}

namespace Microsoft.Data.Sql
{
/// <include file='../../../../doc/snippets/Microsoft.Data.Sql/SqlNotificationRequest.xml' path='docs/members[@name="SqlNotificationRequest"]/SqlNotificationRequest/*' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ internal OperationAbortedException() { }
private OperationAbortedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }

}

/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlDbTypeExtensions/*' />
public static class SqlDbTypeExtensions
Comment thread
saurabh500 marked this conversation as resolved.
{
/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlJson[@name="default"]' />
public const System.Data.SqlDbType Json = (System.Data.SqlDbType)35;
}
}

namespace Microsoft.Data.Sql
{
/// <include file='../../../../doc/snippets/Microsoft.Data.Sql/SqlNotificationRequest.xml' path='docs/members[@name="SqlNotificationRequest"]/SqlNotificationRequest/*' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@

namespace Microsoft.Data
{
/// <summary>
/// Extensions for SqlDbType enum to enable its usage.
/// </summary>
/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlDbTypeExtensions/*' />
public static class SqlDbTypeExtensions
{
/// <summary>
/// Represents the JSON Data type in SQL Server.
/// </summary>
/// <include file='../../../../doc/snippets/Microsoft.Data/SqlDbTypeExtensions.xml' path='docs/members[@name="SqlDbTypeExtensions"]/SqlJson[@name="default"]' />
#if NET9_0_OR_GREATER
public const SqlDbType Json = SqlDbType.Json;
#else
Expand Down