Docs / MooSql Reference

MooSql Reference

Role#

MooSql is the explicit SQL-text surface for MooDb.

Main methods#

</> C#
Task<int> ExecuteAsync(...)
Task<T> ScalarAsync<T>(...)
Task<T?> SingleAsync<T>(...)
Task<T?> SingleAsync<T>(..., Func<SqlDataReader, T> map, ...)
Task<List<T>> ListAsync<T>(...)
Task<List<T>> ListAsync<T>(..., Func<SqlDataReader, T> map, ...)
Task<TResult> QueryMultipleAsync<TResult>(..., Func<IMooMultiReader, TResult> read, ...)

Key points#

  • MooSql is for SQL text, not stored procedure names
  • it exists on both MooDbContext and MooTransaction
  • the multi-result callback is synchronous