fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
564 stars 144 forks source link

Consider moving to Microsoft.Data.SqlClient #724

Open isaacabraham opened 3 years ago

isaacabraham commented 3 years ago

The System.Data.SqlClient nuget package is (AFAIK) obsolete. It also doesn't work with F# scripts / FSI easily. The Microsoft.Data.SqlClient library does and as I understand it is the vehicle for SQL Client data access moving forward.

JordanMarr commented 3 years ago

MS.Data.SqlClient is supported, but unfortunately you have to use the dynamic sql provider.

Thorium commented 3 years ago

Now that dynamic supports whatever version, we can consider changing the default.

costa100 commented 2 years ago

Until then, could please provide clear instructions on how to get it working. Even though I followed your instructions, I still coudn't get it working. See this: https://github.com/fsprojects/SQLProvider/issues/645#issuecomment-998267558.

xperiandri commented 1 year ago

Any updates? @JordanMarr how to use Dynamic Provider?

JordanMarr commented 1 year ago

I only use the SSDT provider, so I don’t have any relevant experience using the dynamic provider.

Thorium commented 1 year ago

Hello Microsoft!

Microsoft.Data.SqlClient should be a database driver!

I try to add a reference to Microsoft.Data.SqlClient and Paket says I get these new dependencies to the project:

- Azure.Core: 1.26.0 (added)
- Azure.Identity: 1.8.0 (added)
- Microsoft.CSharp: 4.7.0 (added)
- Microsoft.Data.SqlClient: 5.0.1 (added)
- Microsoft.Data.SqlClient.SNI: 5.0.1 (added)
- Microsoft.Data.SqlClient.SNI.runtime: 5.0.1 (added)
- Microsoft.Identity.Client: 4.48.1 (added)
- Microsoft.Identity.Client.Extensions.Msal: 2.25.0 (added)
- Microsoft.IdentityModel.Abstractions: 6.25.0 (added)
- Microsoft.IdentityModel.JsonWebTokens: 6.25.0 (added)
- Microsoft.IdentityModel.Logging: 6.25.0 (added)
- Microsoft.IdentityModel.Protocols: 6.25.0 (added)
- Microsoft.IdentityModel.Protocols.OpenIdConnect: 6.25.0 (added)
- Microsoft.IdentityModel.Tokens: 6.25.0 (added)
- Microsoft.SqlServer.Server: 1.0.0 (added)
- Microsoft.Web.WebView2: 1.0.1418.22 (added)
- System.ComponentModel.TypeConverter: 4.3.0 (added)
- System.IdentityModel.Tokens.Jwt: 6.25.0 (added)
- System.IO.FileSystem.AccessControl: 5.0.0 (added)
- System.Memory.Data: 6.0.0 (added)
- System.Runtime.Caching: 6.0.0 (added)
- System.Runtime.InteropServices.NFloat.Internal: 6.0.1 (added)
- System.Runtime.Serialization.Formatters: 4.3.0 (added)
- System.Runtime.Serialization.Primitives: 4.3.0 (added)
- System.Security.SecureString: 4.3.0 (added)
- System.Xml.XmlDocument: 4.3.0 (added)
- Xamarin.Android.Arch.Core.Common: 1.1.1.3 (added)
- Xamarin.Android.Arch.Core.Runtime: 1.1.1.3 (added)
- Xamarin.Android.Arch.Lifecycle.Common: 1.1.1.3 (added)
- Xamarin.Android.Arch.Lifecycle.LiveData: 1.1.1.3 (added)
- Xamarin.Android.Arch.Lifecycle.LiveData.Core: 1.1.1.3 (added)
- Xamarin.Android.Arch.Lifecycle.Runtime: 1.1.1.3 (added)
- Xamarin.Android.Arch.Lifecycle.ViewModel: 1.1.1.3 (added)
- Xamarin.Android.Support.Annotations: 28.0.0.3 (added)
- Xamarin.Android.Support.AsyncLayoutInflater: 28.0.0.3 (added)
- Xamarin.Android.Support.Collections: 28.0.0.3 (added)
- Xamarin.Android.Support.Compat: 28.0.0.3 (added)
- Xamarin.Android.Support.CoordinaterLayout: 28.0.0.3 (added)
- Xamarin.Android.Support.Core.UI: 28.0.0.3 (added)
- Xamarin.Android.Support.Core.Utils: 28.0.0.3 (added)
- Xamarin.Android.Support.CursorAdapter: 28.0.0.3 (added)
- Xamarin.Android.Support.CustomTabs: 28.0.0.3 (added)
- Xamarin.Android.Support.CustomView: 28.0.0.3 (added)
- Xamarin.Android.Support.DocumentFile: 28.0.0.3 (added)
- Xamarin.Android.Support.DrawerLayout: 28.0.0.3 (added)
- Xamarin.Android.Support.Interpolator: 28.0.0.3 (added)
- Xamarin.Android.Support.Loader: 28.0.0.3 (added)
- Xamarin.Android.Support.LocalBroadcastManager: 28.0.0.3 (added)
- Xamarin.Android.Support.Print: 28.0.0.3 (added)
- Xamarin.Android.Support.SlidingPaneLayout: 28.0.0.3 (added)
- Xamarin.Android.Support.SwipeRefreshLayout: 28.0.0.3 (added)
- Xamarin.Android.Support.VersionedParcelable: 28.0.0.3 (added)
- Xamarin.Android.Support.ViewPager: 28.0.0.3 (added)
- Xamarin.AndroidX.Annotation: 1.5.0.1 (added)
- Xamarin.AndroidX.Annotation.Experimental: 1.3.0.1 (added)
- Xamarin.AndroidX.Arch.Core.Common: 2.1.0.16 (added)
- Xamarin.AndroidX.Arch.Core.Runtime: 2.1.0.16 (added)
- Xamarin.AndroidX.Browser: 1.4.0.3 (added)
- Xamarin.AndroidX.Collection: 1.2.0.5 (added)
- Xamarin.AndroidX.Concurrent.Futures: 1.1.0.10 (added)
- Xamarin.AndroidX.Core: 1.9.0.1 (added)
- Xamarin.AndroidX.Interpolator: 1.0.0.15 (added)
- Xamarin.AndroidX.Lifecycle.Common: 2.5.1.1 (added)
- Xamarin.AndroidX.Lifecycle.Runtime: 2.5.1.1 (added)
- Xamarin.AndroidX.Migration: 1.0.10 (added)
- Xamarin.AndroidX.VersionedParcelable: 1.1.1.15 (added)
- Xamarin.Google.Guava.ListenableFuture: 1.0.0.10 (added)
- Xamarin.Jetbrains.Annotations: 23.0.0.5 (added)
- Xamarin.Kotlin.StdLib: 1.7.20.1 (added)
- Xamarin.Kotlin.StdLib.Common: 1.7.20.1 (added)
Thorium commented 1 year ago

The version 1.3.5 is now using Microsoft.Data.SqlClient on .Net6.0 and .NetStandard 2.1, and the old System.Data.SqlClient on .Net 4.7.2 and .NetStandard 2.0. This is initial trial via simple conditional compilation (because the base classes are the same) so please let me know if it works or not.