VSProject.SQLContext 5.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package VSProject.SQLContext --version 5.0.0
                    
NuGet\Install-Package VSProject.SQLContext -Version 5.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VSProject.SQLContext" Version="5.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VSProject.SQLContext" Version="5.0.0" />
                    
Directory.Packages.props
<PackageReference Include="VSProject.SQLContext" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VSProject.SQLContext --version 5.0.0
                    
#r "nuget: VSProject.SQLContext, 5.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VSProject.SQLContext@5.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VSProject.SQLContext&version=5.0.0
                    
Install as a Cake Addin
#tool nuget:?package=VSProject.SQLContext&version=5.0.0
                    
Install as a Cake Tool

What is it?

SQL Context it is microORM for easy mapping your sql queries to VB and C# classes. The library has some special features that provide the flexibility to configure the mapping:

  • Attributes (PrimaryKey, AutoIncrement, Programmable, Table, Column)
    • Table, Column - allow you to change the names of classes and properties, and the projection on the other table and column names
  • Mapping to static .NET types, such as classes and structures
  • Mapping to dynamic objects
  • Caching types for optimizing speed work
  • The architecture is based on an interface IDbConnection, that redesign library to connect any ADO.NET data provider

How I can use ?

Sample Code

Define your class for table row

<code> <Table("table_test")> Public Class ClassTest

    <PrimaryKey>
    Public Property ID As Long

    <Column("field_name")>
    Public Property Name As String

    <Column("field_address")>
    Public Property Address As String

    <Programmable>
    Public Property Phone As PhoneObject

    <Programmable>
    Public Property Skype As PhoneObject

End Class

</code>

Connect to database and get each row in object class

<code>

Using context As New SQLContext(New SQLiteConnection("Data Source=C:\test.db"))

    ' You can read row as object class
    
    For Each row In context.SelectRows(Of ClassTest)("select id, field_name, field_address from table_test")
	Console.WriteLine($"Your record data is {row.ID}, {row.Name}, {row.Address}")	
    Next
    
    ' Or you can read as Dictionary(Of String, Object)
    
    For Each row In context.SelectRows("select id, field_name, field_address from table_test")
	Console.WriteLine($"Your record data is {row("id")}, {row("field_name")}, {row("field_address")}")	
    Next

    ' Or you can read as dynamic object
    For Each row In context.SelectRowsDynamic("select id, field_name, field_address from table_test")
	Console.WriteLine($"Your record data is {row.id}, {row.field_name}, {row.field_address}")	
    Next
    
    ' Or do you have full control?
    Dim reader = context.ExecuteReader("select id, field_name, field_address from table_test")
    
End Using

</code>

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.2.1 149 5/5/2025
5.2.0 139 4/12/2025
5.1.0 147 7/31/2024
5.0.0 100 7/29/2024
4.0.0 896 4/3/2022
3.5.0 926 12/26/2020
3.3.0 860 8/3/2020
3.1.0 937 7/26/2020
3.0.1 904 7/23/2020
3.0.0 1,833 7/23/2020
2.3.0 2,741 9/29/2015

* Обновленный интерфейс мапперов, переосмыслена реализация
* Исправление ошибок и увеличение производительности в разы
* Удалены классы которые устарели и должны реализовываться пользователем
* Новый интерфейс для параметризации запросов (словарный тип или анонимный объект)

Большое количество примеров доступно в проекте NUnitAutoTest