Let's take the dynamic entity from Fabio's article "duck typing with nhibernate"
http://fabiomaulo.blogspot.com/2009/07/duck-typing-with-nhibernate.html

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">

   <class entity-name="ProductLine">
       <id name="Id" type="int">
           <generator class="hilo"/>
       </id>
       <property name="Description" not-null="true" length="200" type="string"/>

       <bag name="Models" cascade="all" inverse="true">
           <key column="productId"/>
           <one-to-many class="Model"/>
       </bag>

   </class>

   <class entity-name="Model">
       <id name="Id" type="int">
           <generator class="hilo"/>
       </id>

       <property name="Name" not-null="true" length="25" type="string"/>
       <property name="Description" not-null="true" length="200" type="string"/>
       <many-to-one name="ProductLine"
                    column="productId"
                    not-null="true"
                    class="ProductLine"/>
   </class>

</hibernate-mapping>

one can write

using (ISession s = sessions.OpenSession())
{
   s.CreateQuery("from Model m where m.Name = 'test' ").List();
}
how can i query this with nhlinq because i have only this way:
session.Linq<T> but T is IDictionary....




On Sun, Aug 2, 2009 at 4:21 PM, Tuna Toksoz<[email protected]> wrote:
> You can use entity names perhaps but it requires you to have a corresponding
> class :/
> Can you show me a usecase class mapping sample data and the query.
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksoz
> http://tunatoksoz.com
> http://twitter.com/tehlike
>
>
>
>
> On Sun, Aug 2, 2009 at 4:01 PM, ursuletzu <[email protected]> wrote:
>>
>> Hi, Has anyone a sample of how to use linq 1.0.0 rtm with dynamic
>> entities?
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to