Local Method Calls
Posted: Fri 08 Aug 2014 06:01
I am using the last version of Linqconnect, 4.4.553.0, for the SQL server. I am trying to excute a query but it keeps crashing with an error, Specified method is not supported.
I am using a local method in side the query.
My query is
WOZDataContext dc = new WOZDataContext();
var transacties = (from tt in dc.WOZTRNs
join t in dc.TRNs on new { tt.GemeenteCode, tt.VolgnummerMarktgegeven } equals new { t.GemeenteCode, t.VolgnummerMarktgegeven }
where tt.GemeenteCode == GebruikerSessie.GemeenteCode
&& tt.WozObjectNummer == WozObjectNummer
&& t.Actueel == true
&& tt.Actueel == true
select new
{
t.VolgnummerMarktgegeven,
t.Transactieprijs,
t.DatumTransactie,
t.AanduidingBruikbaarheid,
t.SoortTransactie,
BeginRelatie = GetBeginRelatie(tt) }).ToList();
The query called this local function
private string GetEindRelatie(WOZTRN wt)
{
if (wt.EindRelatie == busAPP.Database.LegeEindDatum)
{
return "";
}
else
{
return wt.EindRelatie.ToShortDateString();
}
}
Any help would be highly appreciated
I am using a local method in side the query.
My query is
WOZDataContext dc = new WOZDataContext();
var transacties = (from tt in dc.WOZTRNs
join t in dc.TRNs on new { tt.GemeenteCode, tt.VolgnummerMarktgegeven } equals new { t.GemeenteCode, t.VolgnummerMarktgegeven }
where tt.GemeenteCode == GebruikerSessie.GemeenteCode
&& tt.WozObjectNummer == WozObjectNummer
&& t.Actueel == true
&& tt.Actueel == true
select new
{
t.VolgnummerMarktgegeven,
t.Transactieprijs,
t.DatumTransactie,
t.AanduidingBruikbaarheid,
t.SoortTransactie,
BeginRelatie = GetBeginRelatie(tt) }).ToList();
The query called this local function
private string GetEindRelatie(WOZTRN wt)
{
if (wt.EindRelatie == busAPP.Database.LegeEindDatum)
{
return "";
}
else
{
return wt.EindRelatie.ToShortDateString();
}
}
Any help would be highly appreciated