Asp.net-mvc, using nhibernate.
my vs.net layout is like:
- /dao (1 class per entity for database work, using repository)
- /model
- /mappings
- /factory (db factory that provides access to each entities Dao)
Now I need utility methods, not sure where to put them.
example:
- CartItems.cs
- CartIemsDao.cs
Now say I have a method like:
IList<CartItem> items = CartItemsDao.GetById(234)
Now I want to create a method that populates a Dictionary<int,CartItem>
from a given IList<CartItem>
. Should I create a CartItemManager.cs for this?
And what would a 'Service' type class be used for? e.g. CartService.cs
I believe someone said earlier a 'service' type class is to wrap multiple calls/logic for Dao's etc. Is that what it is?