I am trying to do a simple select from a Oracle table with Dapper using the Devart driver
using (var sqlConnection = new Devart.Data.Oracle.OracleConnection(cs))
{
sqlConnection.Open();
var sql = @"SELECT ""AnalasisId"" = @AnalasisId, ""Name"" = @Name, ""Description"" = @Description, ""AnalasisGroupId"" = @AnalasisGroupId FROM ""Analasis"";";
var analasis = sqlConnection.Query<Analasis>(sql);
}
But I get
ORA-00923: FROM keyword not found where expected
If I run
SELECT "AnalasisId" = @AnalasisId, "Name" = @Name, "Description" = @Description, "GroupId" = @GroupId FROM "Analasis";
In Oracle SQL Dev then I get the same error, so I guess my mapping is wrong, but then how am I supposed to do the mapping with dapper to my C# class ?
Is there a better driver than devart suited for this?
The SQL syntax does not look like Oracle. Try this one:
var sql = @"SELECT AnalasisId, Name, Description FROM Analasis";