TranceSQL logo

TranceSQL

A lightweight .NET client library for SQL databases

GitHub Documentation

Simplified SQL Access for .NET

TranceSQL provides an easy to use, high performance data access interface for SQL databases. It allows you to create SQL queries in an API which closely resembles the final SQL query and provides execution and result object mapping.

Example


public string GetUsername(int id)
{
  var database = new SqlServerDatabase(connectionString);
  var command = new Command(database)
  {
    new Select
    {
      Column = { "FirstName" }
      From = "Users"
      Where = Condition.Equal("UserID", id)
    }
  };

  // This executes as "SELECT [FirstName] FROM [Users] WHERE [UserID] = @P1"
  var user = command.Fetch<User>();

  return user.FirstName;
}
    

Supported Databases

TranceSQL offers support for popular RDBMS vendor SQL dialects.