Page 1 of 1

Local Method Calls

Posted: Fri 08 Aug 2014 06:01
by Gomam
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

Re: Local Method Calls

Posted: Tue 12 Aug 2014 09:23
by MariiaI
We couldn't reproduce this issue with the latest build of LinqConnect 4.4.553.
Please specify the following details:
- the full stack trace of the error;
- the definitions of the entity classes and the DDL/DML scripts for the corresponding database tables, etc.;

Please also send us a test project, with which the error is reproducible, so that we could investigate it in more details and find the solution for you in a shortest time.

Re: Local Method Calls

Posted: Tue 12 Aug 2014 12:25
by Gomam
Thanks for your reply.

The local method i am using has a parameter class, tt, the entity WOZTRN, that's why it does not work. Linqconnect supports only variables, simple types, not complex types as classes or objects.

Is there any way where i can pass a class as a parameter in my method

Thanks again

Re: Local Method Calls

Posted: Wed 13 Aug 2014 11:35
by MariiaI
We are sending you a working sample project to the e-mail address you have provided in your forum profile; please check that the letter is not blocked by your mail filter. Please modify our sample project so that the issue could be reproduced and send it back to us, or send us your sample project.