SubSonic-3.0
SubSonic-3.0 copied to clipboard
Add Dynamic Linq Library to SubSonic
In syntax of SubSonic 2 i can this:
SqlQuery query = new Select().From<Table>() .Where(col).Like(string.Format("%{0}%", val)) .OrderDesc(col);
where "col" and "val" are strings...
But in SubSonic 3 using Linq syntax it's not possible because Linq is type-safe. But has situations where is nedeed make queries dynamically.
I found the library DynamicLinq (DynamicQueryable) and this make possible queryes about this:
Table.All().Where(string.Format("{0}.Contains("{1}")", col, val)).OrderBy(col);
Its is not a good idea for next versions?