For over two decades, the C# programming language has allowed developers to build secure and robust applications within the .NET ecosystem.
SQL Server 2019 supports the R, Python, and Java Language Extensions. These language extensions provide many benefits to developers. They provide data security, rapid speed for deployment, and ease of integration.
This extension is yet another example of using the developed programming language extensibility architecture which provides integration with a new type of language extension. This latest architecture allows customers to have the freedom to use existing SQL Server tables which they can pass to a C# application as a DataFrame. Then, they can perform operations in C#, use the rich libraries, and obtain back a result set. One of the reasons to use C# is to reuse existing customer C# code, calculations, logic, or extensive libraries that provide functionality which you cannot get in T-SQL. We encourage developers to use the .NET 5 C# Language Extension and build on it.
Let us look at what use cases C# can enable inside SQL Server. Bringing C# workloads closer to the data opens a variety of possibilities:
- Data cleaning.
- Fast data querying.
- Any processing in C# can now occur through a DataFrame.
- Customers are not limited to the T-SQL language surface area.
- C# application development teams that leverage SQL Server as backend storage can now even embed C# code in stored procedures which enables pushing business logic down into the database for better performance.
- Furthermore, this will help avoid unnecessary data movement and latency when data must be retrieved from SQL Server and moved into the app tier to do the business logic processing.
Why open source?
Like Java, Python, and R have open-source language extensions, it is a natural next step to open source the .NET 5 C# Language Extension. This language extension leverages the Extensibility Framework API for SQL Server and this API is publicly documented. The API along with the open-source code of the .NET Core C# language extension shows an example of how a programming language extension can be built. Now, more developers in the SQL Server community can continue to develop additional programming language extensions.
If you want to start using the .NET 5 C# language extension for SQL Server, follow this tutorial. If you are interested in creating your own language extension, explore more information on SQL Server Language Extensions.
The post Open sourcing the .NET 5 C# Language Extension for SQL Server appeared first on Microsoft SQL Server Blog.