Search code examples
c#sql-serversqlkata

is there any way to create query including function in projection and outer apply in sqlkata?


I need some advance feature of SQL inside sqlkata such as outer apply of IIF expression inside the projection. is there any way to create such query inside sqlkata?


Solution

  • The only way to achieve this is by using the SelectRaw method.

    query.SelectRaw("IIF(a > b, 'larger', 'smaller') as col").Select("Id");