A lightweight .NET client library for SQL databases
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.
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;
}
TranceSQL offers support for popular RDBMS vendor SQL dialects.