How to call SQL View Dapper C #

Is there a way to invoke a sql view using Dapper C #?

I already know how to call stored procedures with this, but when it comes to views, I have no idea how to do this.

+4
source share
1 answer

The view works like a table in terms of queries, including how filters and parameters work - something like:

string region = ...
var data = connection.Query<SomeType>(
    "select * from SomeView where Region = @region", new { region }).AsList();
+4
source

Source: https://habr.com/ru/post/1679841/


All Articles