Using dapper.contrib, I keep getting the error: '42P01: relation "tblproduct" does not exist'
.
I believe this to be because postgresql is case sensitive. The entity itself has the schema annotation of '[Table("tblProduct")]'
.
I can't find why the generated sql will use a lowercase tablename? I'm using the 'SqlMapperExtensions.TableNameMapper'
to force the case but this doesn't work either. Am I missing something? Thanks
public ICollection<Product> GetAll(int count)
{
if (SqlMapperExtensions.TableNameMapper != null)
return null;
SqlMapperExtensions.TableNameMapper = (type) =>
{
return "tblProduct";
};
using (var connection = new NpgsqlConnection(connectionString))
{
connection.Open();
return connection.GetAll<Product>().Take(count).ToList();
}
}