Skip to content

Conversation

@DavoudEshtehari
Copy link
Contributor

@DavoudEshtehari DavoudEshtehari commented Dec 14, 2021

A rework on #1140 without any changes on the .Net Core project.

Microsoft.SqlServer.Server (new NuGet Package)

  • Provides Microsoft.SqlServer.Server (10 types) – targeting .NET Standard 2.0

    • Microsoft.Sqlserver.Server.SqlFacetAttribute
    • Microsoft.Sqlserver.Server.SqlFunctionAttribute
    • Microsoft.SqlServer.Server.SqlMethodAttribute
    • Microsoft.Sqlserver.Server.SqlUserDefinedAggregateAttribute
    • Microsoft.Sqlserver.Server.SqlUserDefinedTypeAttribute
    • Microsoft.SqlServer.Server.IBinarySerialize
    • Microsoft.SqlServer.Server.Format
    • Microsoft.SqlServer.Server.DataAccessKind
    • Microsoft.SqlServer.Server.SystemDataAccessKind
    • Microsoft.SqlServer.Server.InvalidUdtException
  • Types forwarded to System.Data - for .NET Framework 4.6.1+

@DavoudEshtehari DavoudEshtehari added the Public API 🆕 Issues/PRs that introduce new APIs to the driver. label Dec 14, 2021
if (udtAttr == null)
{
throw InvalidUdtException.Create(target, Strings.SqlUdtReason_NoUdtAttribute);
throw Server.InvalidUdtException.Create(target, Strings.SqlUdtReason_NoUdtAttribute);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If InvalidUstException bubbles up to users, this is another one we need to move to and get from Microsoft.SqlServer.Server. That's where it was originally:

https://github.com/dotnet/corefx/blob/release/3.1/src/System.Data.SqlClient/src/System/Data/Sql/InvalidUdtException.cs

…erverSep

# Conflicts:
#	src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/Server/sqlser.cs
}

/// <include file='../../doc/snippets/Microsoft.Data.SqlClient.Server/InvalidUdtException.xml' path='docs/members[@name="InvalidUdtException"]/Create/*' />
internal static InvalidUdtException Create(Type udtType, string resourceReason = "SqlUdtReason_NoUdtAttribute")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we go ahead and open this up as public now, we can reference it without using reflection in the future once we drop netfx support (still years out). And we won't have to release a new version of MSS to do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, David. I've missed the main goal of adding xml doc here. 😄 Done.

Copy link
Contributor

@David-Engel David-Engel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DavoudEshtehari DavoudEshtehari changed the title WIP | Feature: Project Microsoft.SqlServer.Server separation phase 1 Feature | Project Microsoft.SqlServer.Server separation phase 1 (MDS consumes MSS using netfx) Jan 26, 2022
@DavoudEshtehari DavoudEshtehari added this to the 5.0.0-preview1 milestone Jan 26, 2022
@DavoudEshtehari DavoudEshtehari merged commit 54ab5ae into dotnet:main Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants