Why can't I use .select on a queryAsync when it works fine on Query? For example, here the .select yells at me telling me it cant resolve the symbol "select":
var result = await sqlConnection.QueryAsync<Product>(procedure,
commandType: CommandType.StoredProcedure).Select(p => new Product
{
Code= (string)p.fldCode,
Name=(string)p.fldName
});
but as soon as i change to Query, it doesn't yell anymore. if anything it has trouble resolving the fldCode columns from the sp:
var result = sqlConnection.Query<Product>(procedure,
commandType: CommandType.StoredProcedure).Select(p => new Product
{
Code= (string)p.fldCode,
Name=(string)p.fldName
});
why is this?
I asked a previous question here C# Dapper mapping columns to entity properties - "Cannot resolve symbol 'Select'"