Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlFacet missing? #700

Closed
agilenut opened this issue Aug 19, 2020 · 7 comments · Fixed by #757
Closed

SqlFacet missing? #700

agilenut opened this issue Aug 19, 2020 · 7 comments · Fixed by #757
Labels
💡 Enhancement New feature request

Comments

@agilenut
Copy link

I'm looking for the SqlFacet class. It appears to be in the old System.Data.SqlClient package for the full .Net framework and in .Net Core but was not available when referencing System.Data.SqlClient from a Net Standard library.

Similarly, it appears SqlFacet is missing from this repository.

Can someone explain why it has not been accessible from Net Standard when referencing System.Data.SqlClient and why it is not in this repository now?

Is there a plan to add SqlFacet to this repository and to make it accessible when referencing Microsoft.Data.SqlClient from a Net Standard library?

Thanks!

@cheenamalhotra
Copy link
Member

Hi @agilenut

From initial research, I think we should be able to support it, it's probably missed out here.
We will acknowledge this as an enhancement and plan to support it soon.

I'm not sure why it was not available in .NET Standard for S.D.S, but will look more into it and update again.

@cheenamalhotra cheenamalhotra added the 💡 Enhancement New feature request label Aug 20, 2020
@agilenut
Copy link
Author

Hi @cheenamalhotra. Thanks for marking that as an enhancement. I'll keep an eye on this.

For now, we will likely multi-target netstandard2.0 and net48 and will include a definition of the attribute class in our project wrapped in #if / #endif to get netstandard to compile.

@edstegman
Copy link

The missing attribute is also mentioned here, way back in 2017, where it is one of many missing things flagged as "TypesMustExist".
#17

@Wraith2
Copy link
Contributor

Wraith2 commented Aug 20, 2020

Conjecture. SqlFacet is used in SQLCLR and the netcore version of this library can't be used in SQLCLR so it was removed in porting netfx to netcore. Because netstandard was union of netcore and netfx it being missing in netcore probably caused it to be omitted from netstandard. While the type can be added it won't have any use in this library as far as I know. What are you intending to do with it?

@agilenut
Copy link
Author

agilenut commented Aug 20, 2020

@Wraith2

We have a library of lookup types that act similar to enums which need to be available to SQLCLR as well as logic in various nuget libraries and other business logic. Having the attribute in netstandard would allow us to target our types library to netstandard, thus allowing the other libraries and business logic that references it to be in netstandard. The actual attribute will not be used in netstandard but having it available allows us to multi-target both uses cases (4.8 for SQLCLR and netstandard for our calling libraries).

@Wraith2
Copy link
Contributor

Wraith2 commented Aug 20, 2020

The type won't be added to netstandard, there will be no further versions of netstandard now that .net5 and later are unifying the bcl for netcore and mono. It's trivial to add it to this library's netstandard build but it'll never be usable. If that is enough then I'm fine with adding it I just want you to be aware it's not going to be usable for anything but satisfying type presence, which sounds like it might be all you need.

@agilenut
Copy link
Author

agilenut commented Aug 20, 2020

@Wraith2 - Yes, that is all that I need. And, yes, I'm not expecting the type to become a part of the netstandard definition. I just need it in a package that targets netstandard2.0 so that I can reference it from a netstandard2.0 project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Enhancement New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants