Grad.CsLib.Data 2.0.12

dotnet add package Grad.CsLib.Data --version 2.0.12
                    
NuGet\Install-Package Grad.CsLib.Data -Version 2.0.12
                    
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="Grad.CsLib.Data" Version="2.0.12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Grad.CsLib.Data" Version="2.0.12" />
                    
Directory.Packages.props
<PackageReference Include="Grad.CsLib.Data" />
                    
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 Grad.CsLib.Data --version 2.0.12
                    
#r "nuget: Grad.CsLib.Data, 2.0.12"
                    
#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 Grad.CsLib.Data@2.0.12
                    
#: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=Grad.CsLib.Data&version=2.0.12
                    
Install as a Cake Addin
#tool nuget:?package=Grad.CsLib.Data&version=2.0.12
                    
Install as a Cake Tool

CsLib.Data

This package has utilities for EF Core and Dapper.

I prefer EF Core's scaffold tool, but it is painful to write queries with, so for that we use Dapper.

This project is intended entirely for SQL Server.

Requirements

  • .NET Core 10
  • dotnet-ef: dotnet tool install --global dotnet-ef

Dependencies

Here are the main dependencies:

Schema Migrations

Schemas are intended to be written in SQL files and then scaffolded with EF Core into C# models and DbContext classes.

The convention is:

  1. Have a project in the solution which name ends in Data, e.g. ExampleData.
  2. Have a folder inside it called schema, containing SQL files that sort correctly to run in order.
    • For example, 0001_Initial.sql, 0002_AddTable.sql, etc.
    • Include them in the assembly:
      <ItemGroup>
        <EmbeddedResource Include="schema/**/*.sql" />
      </ItemGroup>
      
  3. In the Data project's Program.cs, create a DatabaseMigrator and call its Upgrade() method.
  4. Run the Data project against the database.
  5. Run the EF Core scaffold tool against the database.

The CsLib.Tool project has some automation for this flow, it will take care of running the migrations and scaffolding the models against a temporary Docker database.

Other Utilities

See the Grad.CsLib.Data.md file for the full list.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Grad.CsLib.Data:

Package Downloads
Grad.Codebook

Data model for Grad Codebook. It acts as an interface to U of I code data, such as programs and departments.

Grad.Codebook.Testing

Testing utilities for Grad Codebook. Allows projects to set up a test Codebook database with tables instead of views.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.12 368 1/30/2026
2.0.11 290 1/29/2026
2.0.10 99 1/29/2026
2.0.9 93 1/29/2026
2.0.8 107 1/29/2026