Yeah, thats correct. so if i explicitly state the variable type, it should not be any problem. but it is a problem.
somebody should check this case with nhibernate sourcecode or state a bug for them to chechk it. On Tuesday, October 9, 2012 5:52:10 PM UTC+3:30, fknebels wrote: > > I'm not sure I understand. > > All linq variables are already strongly typed. There is no need to > declare from Person person, because the compiler is taking the type from > your Session.Query<Person>. it knows you are querying a strongly typed > list of Persons so the type of person must be Person. > > See http://msdn.microsoft.com/en-us/library/bb397676.aspx > > > On Tuesday, October 9, 2012, Arman wrote: > >> This is not a real case. >> this is just my way to show you what the problem is. >> >> The problem is lay down under specifying Linq Variable type in Linq >> query. >> >> >> >> On Thursday, September 27, 2012 5:50:51 PM UTC+3:30, Arman wrote: >>> >>> With Nhibernate 3.3.1.4000 and Fluent Nhibernate 1.3 , use code like >>> this : >>> >>> var query = from Person person in Session.Query<Person> select >>> person; >>> var query2 = from Person person in query select person; >>> >>> you will get "Specified Method not supported" Exception. *BUT if you >>> change them to this, it works :* >>> * >>> * >>> var query = from person in Session.Query<Person> select person; >>> var query2 = from person in query select person; >>> >>> i mean if you specify the class type in linq query on query variable , >>> Nhibernate cannot run the query, but if you remove it's type, it can be run. >>> >>> >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/nhusers/-/Enfgaeth8mIJ. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/tGQs6oW-tgMJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
