Anele Ngqandu

Anele Ngqandu

  • 1.2k
  • 417
  • 25.6k

Issues with Dapper query syntax

Nov 11 2020 4:57 AM
Hi All
 
little assistance here with my query using dapper, been getting error Message = "ORA-00936: missing expression\n" on my query. I would like to know what am I missing here?
  1. public class LocationDto  
  2. {  
  3.     public int LocationId { getset; }  
  4.     public int RouteId { getset; }  
  5.     public string StartTime { getset; }  
  6.     public string Location { getset; }  
  7. }  
  8. // Query Below  
  9. using (OracleConnection connection = new OracleConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))  
  10. {  
  11.     try {  
  12.         var x = connection.QueryAsync("Select ROUTE_ID as RouteId,  SCHEDULE_STOP as Location, START_TIME as StartTime From SCHEDULE WHERE ROUTE_ID = @Id"new { input.RouteId }).Result.ToList();  
  13.       
  14.     }  
  15.     catch (Exception ex)  
  16.     {   
  17.                       
  18.     }  
  19. }

Answers (1)