-
Notifications
You must be signed in to change notification settings - Fork 7
Dapper
markjerz edited this page Jan 8, 2016
·
1 revision
There are (currently) many occasions where you might wish to return to the "comfort" of using Dapper on its own so that you can execute a complicated query or simply maximise the performance of your database interaction. To take advantage of dapper simply use the Dapper property on your ISession and then invoke whichever method you need. This Dapper property, by default, makes use of the open IDbConnection and IDbTransaction in the session so that you remain in that transaction scope.
using (var session = config.BeginSession()) {
var stuff = await session.Dapper.QueryAsync<Stuff>("select * from stuff where id = @Id", new { Id = 1 });
}