Is there a option to inject a custom SQL query to UI-O-Matic.
I need to create a dedicated view for some data, that is Date centric and it groups many records.
public static void CreatedQuery(object sender, QueryEventArgs e)
{
if (e.CurrentType == typeof(SendSatateLogFiltered))
{
e.Query = new Sql(@"
SELECT *
FROM [mSendStateLog] as i1
inner join (
SELECT MAX([ID]) as mId
FROM [mSendStateLog] as i1
where i1.Created > @0
group by [MM]
having MAX(cast(Synced as int)) = 0
) as i3
on i1.ID = i3.mId
", DateTime.Now.ToString("yyyy-MM-dd"));
}
}
UI-O-Matic custum sql query
Hi.
Is there a option to inject a custom SQL query to UI-O-Matic. I need to create a dedicated view for some data, that is Date centric and it groups many records.
Thank you!
Comment author was deleted
Yup that's possible, you can use the event model for that and basically override the query , this should get you started http://www.nibble.be/?p=493, https://github.com/TimGeyssens/UIOMatic/blob/master/src/Example/Startup.cs
That's looks great.
Thank you!
Hi.
I did implement as suggested. But I have a problem with pagination I guess.
SQL Server does return 164 record, but with the same query in UI-O-Matic I do get back only 40 record (4pages)
Any idea?
And the method.
is working on a reply...