repository - SharePoint and Repositories -


this sharepoint + repository design question. far little knowledge goes sharepoint not congenial atmosphere proper repository approach. there patterns guidance has repository implementation. code base takes spweb input parameter , querying / update etc.

my query there: fact repository means spweb must not passed rather taken there - spcontext.current.web have given used within repository. fact spweb taken input means ui layer / service layer have pass spweb in method somehow not appealing me looks violating repository persistence ignorance principles.

some advice pls

cheers

the spweb object contains context , permission information details of site. having parameter makes easy things use elevated object instead of user context object. use site url connection string, more work , caller pretty has suitable spweb object available.

while correct code should ideally independent of data store used, sharepoint isn't set sort of clean, modular code can build standard .net/sql system. can come close sometimes, in case isn't worth effort - calling code dependent on sharepoint anyway, , items unlikely moved anywhere other lists.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -