--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
let me guess... It works with Version & HashedSet (from iesi.)
--
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
You telling me we MUST use the IESI HashedSet then?
--
Fabio Maulo
Maybe we mean different thing with "repository", but I consider the
repository concept (not necessarily the implementation) to be part of
the domain model.
> However the problem is that although iesi is open source and is not an
> NH specific dll, it's not a BCL collection. So far I've strictly
> enforced domain and repository seperation - even handy NH commmands
> such as Unproxy are wrapped in a generic way so if I choose to move my
> repository from NH to EF, to an XML based repository or anything else
> then I know I'm using BCL stuff so most things have a higher chance of
> being ok.
Doesn't EF have special collections classes also? Or is it just
Linq2SQL that require those?
> If I ever decide to move to EF then it will be populating my
> collections instead of NH, and it most definitely will not use iesi
> but probably a Collection<T> or a HashSet<T>. If my domain layer only
> uses ICollection<T> (which from what I understand from the JIRA I
> still can) and one of these other collections for initialisation, then
> I have more chance of doing a drop-in replacement of my NH repository
> with an EF one when the time eventually comes. If EF blows up in the
> same way NH does over iesi HashedSet<T> then I have to change my
> domain layer and seperation is lost.
ICollection<T> as interface.
Domain classes instantiating collection will do
SomeClass-ctor():
MyColl = CollectionFactory.CreateDefaultSet()
So you have one place to change if needed, or even use a pluggable
collection provider behind the static CollectionFactory.
> I accept it's almost an esoteric argument (hence why I'm almost at the
> stage of giving up and going with iesi) but it's a quite important
> principle that I (and I'm sure many others) are loathe to surrender
> without a good fight.
>
/Oskar
If you realy need it, you can do it ;)
An example of CollectionFactory is available in uNhAddIns where we
have implemented it for ObservableCollection to work with WPF (even
collections coming from NH are observable).
--
Fabio Maulo
Fabio:
Ok, this is something I'll look into. If I can abstract it away or
>The work to implement something give full support to System.Collection.Generic.ISet<T> is completelly possible right now.
make it configurable somehow within my repository layer then that's
the best solution. Just to be clear though, I still want to use
ICollection<T> in my domain model but am happy to use HashedSet<T> by
whatever means I create it. HashedSet<T> implements ICollection<T> so
I should be fine. Is that correct?
L2SQL does, EF did (I think). I believe it doesn't have to now, but
>Doesn't EF have special collections classes also? Or is it just Linq2SQL that require those?
even so, it's not a decision I'd take until at least EF 5.0 as it's
still not up to NH's standard. Sooner or later though it will be and
it's my job to ensure the code in our company can be migrated forward
as technology changes.
--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhu...@googlegroups.com.
To unsubscribe from this group, send email to nhusers+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.