cliff, thanks for your input.

I've overlooked your second advice:
> Also, the collectionOfFirsts should declared be an IList<> instead of a
List.

Now it works, this was causing a FatalExecutionEngineError.
But It's really strange, because in such cases I'm getting usually "Unable
to cast object of type ... PersistentGenericBag...  to List ...".


On Fri, Aug 13, 2010 at 6:44 PM, cliff vaughn <[email protected]>wrote:

> On Fri, Aug 13, 2010 at 12:06 PM, Valeriu Caraulean <[email protected]>
> wrote:
> > cliff, thanks for suggestion.
> > But that is how I designed my domain: property is initialized trough
> > constructor and it's read-only for the rest of the world. I want to
> enforce
> > this rule.
> > protected First() { }
> > public First(Second second)
> > {
> > // ...
> > }
> > public virtual Second Second { get; private set; }
> >
>
> I understand, but you should at least make the setter internal, so
> that your domain model can use it with the pattern i've suggested
> before.  It really is, IMHO, the proper way to do things
>
> --
> thanks
>
> cliff
>
> --
> 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]<nhusers%[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 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