I want to abstract data access from my model. I have classes that have collections of other objects and also primary item of object by id.
I need a static GetItemById call from the model for adding these items from the model abstracted from any data access.
How does one go about it?
FYI I’m currently building the model.
Sounds to me like a use for the repository pattern
http://msdn.microsoft.com/en-us/library/ff649690.aspx
(this is a sharepoint example but you can easily find info on general repository patterns in DDD literature)