Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A product can use either custom SQL or retrieve data with Quino and apply aggregations locally with .NET Linq.

Custom SQL

Quino provides several ways of integrating SQL into a query.

...

ICustomCommandBuilder: A high-level API to build custom/parameterized SQL

...

IQuery.CustomCommandText: A low-level API to replace or extend parts of a query

Using ADO: Get access to the underlying ADO driver for the database

...

The ADO.NET layer can be accessed via the related methods:

Code Block
languagec#
Session.GetAdoConnection();
Session.GetAdoCommand();

A custom query can be mapped to an existing MetaClass as well:

Code Block
languagec#
var command = Session.GetAdoCommand();
command.CommandText = "Select * from \"Sandbox__Company\"";
var list = Session.GetListByCommand<Person>(command);

The query needs to fullfil some constraints to be mapped to the Quino-Object:

  • The id of the object. Otherwise subsequent calls to “Save” will fail.

  • Columns selected need to match the “name” of the property in the class - otherwise they’re not mapped.

Integration with Metadata

...