I can only seem to find how to return arrays from my function. Here is my model:
[ActiveRecord("incident")]
public class Incident : ActiveRecordBase<Incident>
{
public Incident() { }
[PrimaryKey("id")]
public int Id { get; set; }
[Property("name")]
public int Name { get; set; }
}
I'm currently using SimpleQuery however I'm not sure if I should be using HqlBasedQuery instead. Here is my call function:
string query = @"select incident_id from Incident where incident_id = :incident_id";
SimpleQuery<Incident> q = new SimpleQuery<Incident>(typeof(Incident), query);
q.SetParameter("incident_id", _incidentId);
q.SetQueryRange(1);
This works but I'd like a generic list of Incident objects.
Thank you.