Local Method Calls

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Gomam
Posts: 4
Joined: Fri 08 Aug 2014 05:47

Local Method Calls

Post by Gomam » 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

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Local Method Calls

Post by MariiaI » Tue 12 Aug 2014 09:23

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.

Gomam
Posts: 4
Joined: Fri 08 Aug 2014 05:47

Re: Local Method Calls

Post by Gomam » Tue 12 Aug 2014 12:25

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

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Local Method Calls

Post by MariiaI » Wed 13 Aug 2014 11:35

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.

Post Reply