c# - Join clause incorrect on multiple join LINQ -


I have a similar match query like this:

  public static list & lt; Answer & gt; GetDetailedAnswers (string tag) {usage (database db = new database ()) {list & lt; Answer & gt; Answer = Question by searching in DB. Join Questioner in DB Answer on search. The id is equal to equal. Joining the dealer in dealer DB. Reply on Deaddler. DialerID deal is equal. To join DB in IT. Country on the deal. Area ID is equal to country. Where to search Basic Inquiry == Select the tag new {ParentSection = quest.ParentSection, Section = quest.Section, Dealer = Dealer.Name, Basic Answers = answ.Original, EngAnswer = answ.English, Region = country.Country}. ); Answer to return; }}   

and I have such an internal range:

  public class answers {public string generator information {received; Set; } Receive the public string stream { Set; } Public String Dealer {get; Set; } Public String OriginalAnswer {get; Set; } Public String EngAnswer {get; Set; } Receive public string field { Set; }}   

I get an error when I join the last. It says, "There is no such kind of expression in the section of the joining." The type insertion call failed to 'join' in the call "What did I remember? Thx

For error: "Anonymous Type # 1 has no definition for 'ToList' and There is no extension method "toList", you can do the following.

  public static list & lt; Answer & gt; GetDetailedAnswers (string tag) {usage (database db = new database ()) {list & lt; Answer & gt; Answer = (In DB, the question is found in DB by answering the question.) Answer on Quest.ID Join Answers.ID at the same deal in Answ.QuestionID db.Dell on Answ.DialerID deal is equal. DB in IT The country of the country to be included in the deal.India is equal country, country ID where search. Original inquiry == Select the tag new answer {find parent = search parent address, section = search Search, Dealer = deal .name, original answer = answ. Original, Biantriki answer = answ.English, region = country.ountry}). to list(); Answer to return; }}   

You need to surround the query within four brackets and then apply. To do this, list () method.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -