Hi Im looking for good solutions when you do not want to connect your
entities entity to entity, instead I want a connection between them
which will be connected by a service for example one scenario is.

Article, Category

Here I have an Article service and where I have the method

ArticleService.GetByCategory(Category category, long page, int
resultSize);

This will be easy to query if the article has an category.
But when I connect the category and article when saving? How should my
approach be?
I do not wan't any category.Articles.Add(article); because I dont
wanna load all my entities when just adding a new entity so a perfect
solution would be ArticleService.Save(Article article, Category
parentCategory); and it will save the connection for me but how? I
could use an mappingclass but it will give me an many-to-many
connection table which I do not prefer, other best practises? I want
to build my system with low coupling but I see this problems with O/R
Mapping tools when I going for it.Is I'm missing anything here? Is
there any easy way to solve this. Maybe should the article know about
it's category but the category should'nt know about any article?
sounds ackward but maybe is the best way?, if it is it would be hard
to have the domain logic for adding or removing items in category or
any another similar case?
--~--~---------~--~----~------------~-------~--~----~
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