would that help?
public class myType
{
public virtual FirstEntity EntityOne {get;set;}
public virtual SecondEntity EntityTwo {get;set;}
}

?

On Fri, Sep 12, 2008 at 12:42 PM, antoschka <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> don't worry the topics of the header of this post belong together.
>
> I try to work with lazy entities. The entity classes the selves are
> defined partial so I generate one part against the database and in
> another partial-part I add certain properties and methods which are
> not mapped.
>
> Using lazy I have to define all Attributes virtual.
>
> Now I run into a problem. Usually the added functionality returns
> mapped entities. Now I have one entity which returns a Type which is
> nothing else then the combination of two types:
> public class myType
> {
> public FirstEntity EntityOne;
> public SecondEntity EntityTwo;
> }
>
> If I use myType as a return parameter of a virtual Property or Method
> in my partial class of a lazy Entity, I get an error at runtime from
> CastleLazyInitilizer (or something like that), since he cannot do a
> reflection on this type (I think GetImplementation() fails).
> If the Property or Method is not virtual it complains that lazy
> entities only accept virtual members.
>
> For now I defined the entity as non-lazy, but is there a way to define
> the it lazy and use non-mapped Types in the entity class?
>
> Thanks a lot for your feedback
>
> antoschka
>
>
> >
>


-- 
Ken Egozi.
http://www.kenegozi.com/blog
http://www.musicglue.com
http://www.castleproject.org
http://www.gotfriends.co.il

--~--~---------~--~----~------------~-------~--~----~
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