I am a newbie with Dapper and I copied this SQL Script(from a test that I was doing with Entity Framework) and tried to return a List of theses rows, but its returning the entire Class and not just the ones that I want!
using (IDbConnection connection = new SqlConnection(@"Data Source=DESKTOP-CD2UQI5\SQLEXPRESS;Initial Catalog=ServerContext;Integrated Security=True"))
{
var res = connection.Query<Table>("select Images,AddressFrom, from Table where Table.id = 1").ToList();
response = Request.CreateResponse(HttpStatusCode.OK, res);
}
Please help.
SqlException
(from the database server, nothing to do with dapper) – Marc Gravell♦ Jul 28 '17 at 8:25