For over two decades, the C# programming language has allowed developers to build secure and robust applications within the .NET ecosystem. New Media Aid's app engineers have been coding .Net apps in C# for all those two decades! Today Microsoft announced that they are open sourcing the .NET 5 C# Language Extension for SQL Server on GitHub.
This extension allows our app developers 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.
Our app engineering team here at New Media Aid are experimenting with the .NET 5 C# Language Extension and hope to build on it.
Some of the advantages of using C# inside SQL Server are listed below:
- 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.
- 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.