How can I call a SQL function in LINQ to SQL using LINQPad?
I have a SQL function with 2 parameters that I can call like this in a SQL select:
select id, member_type_on_date(id, '2020-03-31') as member_type
where id = 112
How can I call that in LINQ?
I tried this:
var query1 = (from c in customers
where c.id == 112
query1.Dump("ID and Member Type");
But I am getting these errors:
CS0746 Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.
CS0103 The name 'member_type_on_date' does not exist in the current context