Marco Minerva marcominerva Working with SQL Server using

  • Slides: 25
Download presentation
Marco Minerva @marcominerva Working with SQL Server using. NET Standard 2. 0

Marco Minerva @marcominerva Working with SQL Server using. NET Standard 2. 0

Sponsor

Sponsor

. NET Standard 2. 0

. NET Standard 2. 0

. NET today – reusing code

. NET today – reusing code

. NET today – reusing code Difficult to reuse skills • Need to master

. NET today – reusing code Difficult to reuse skills • Need to master 3+1 base class libraries Difficult to reuse code • Need to target a fairly small common denominator Difficult to innovate • Need implementations on each platform

. NET tomorrow . NET Standard

. NET tomorrow . NET Standard

. NET tomorrow Reuse skills • Master one BCL, not a Venn diagram Reuse

. NET tomorrow Reuse skills • Master one BCL, not a Venn diagram Reuse code • Common denominator is much bigger Faster innovation • Target. NETStandard & run anywhere. NET

What is. NET Standard? . NET Standard is a specification A set of APIs

What is. NET Standard? . NET Standard is a specification A set of APIs that all. NET platforms have to implement. NET Standard ~ . NET Framework. NET Core Xamarin ~ HTML specification Browsers

. NET Standard versions

. NET Standard versions

Versioning in. NET Standard 2. 0 1. 6 1. 3 1. 0 • Higher

Versioning in. NET Standard 2. 0 1. 6 1. 3 1. 0 • Higher versions incorporate all APIs from previous versions. • Projects targeting version X. Y can reference libraries & projects targeting any version between 1. 0 and X. Y • Concrete. NET platforms implement a specific version of. NET Standard • From that platform you can reference libraries up to that version

. NET Standard 2. 0 Has much bigger API surface Extended to cover intersection

. NET Standard 2. 0 Has much bigger API surface Extended to cover intersection between. NET Framework and Xamarin Makes. NET Core 2. 0 bigger as it implements. NET Standard 2. 0 +20 K Can reference. NET Framework libraries • Compat shim allows referencing existing. NET Framework code – without recompilation • Limited to libs that use APIs that are available for. NET Standard ~70%

. NET Standard and SQL Server

. NET Standard and SQL Server

The road so far (before. NET Standard 2. 0) • System. Data. Sql. Client

The road so far (before. NET Standard 2. 0) • System. Data. Sql. Client available as Nu. Get package for. NET Standard since v 1. 2 • Not all platforms actually supported it (i. e. , old UWP versions) • Some database related classes like Data. Set were missing

. NET Standard 2. 0 • Sql. Client fully supported on all platforms •

. NET Standard 2. 0 • Sql. Client fully supported on all platforms • UWP supports it with the Fall Creators Update • Data. Set is available (again)

Demo

Demo

SQL Server with Linux

SQL Server with Linux

FLEXIBLE, RELIABLE DATA MANAGEMENT SQL Server on the platform of your choice Windows Support

FLEXIBLE, RELIABLE DATA MANAGEMENT SQL Server on the platform of your choice Windows Support for Red. Hat Enterprise Linux (RHEL), Ubuntu, and SUSE Enterprise Linux (SLES) Linux and Windows Docker containers Windows Server / Windows 10 Package-based installation: Yum Install, Apt-Get, and Zypper Linux/Windows container Linux

SQL Operations Studio Cross-Platform SQL Server Management Tool

SQL Operations Studio Cross-Platform SQL Server Management Tool

Dapper with. NET Standard

Dapper with. NET Standard

Classing ADO. NET approach

Classing ADO. NET approach

Dapper is a micro OR/M • Speed • Simplicity • Avoiding the ceremony of

Dapper is a micro OR/M • Speed • Simplicity • Avoiding the ceremony of ADO. NET

How it works • Sits right on top of ADO. NET • Extension methods

How it works • Sits right on top of ADO. NET • Extension methods for IDb. Connection • We need to write SQL • Compatible with. NET Standard 1. 3

Demo

Demo

References • https: //docs. microsoft. com/en-us/dotnet/standard/net -standard • https: //docs. microsoft. com/en-us/sql/linux/sql-serverlinux-setup • https:

References • https: //docs. microsoft. com/en-us/dotnet/standard/net -standard • https: //docs. microsoft. com/en-us/sql/linux/sql-serverlinux-setup • https: //docs. microsoft. com/en-us/sql-operationsstudio/what-is • https: //github. com/Stack. Exchange/Dapper • https: //github. com/marcominerva/Sql. Sat 707

Thank you. Marco Minerva - @marcominerva Microsoft MVP – Windows Development https: //about. me/marcominerva

Thank you. Marco Minerva - @marcominerva Microsoft MVP – Windows Development https: //about. me/marcominerva Dot. Net. Toscana Dotnettoscana. org @dotnettoscana