Where in a domain model is it best to keep a reference to the current user? -
How should the current user pass the repository classes? The connection string used by the repositories requires the current user's credentials. Should each repository be replaced immediately after the user name and password pass as the controller parameters? This would mean that every domain object should be having a repository and be aware of the current user. Is it best to keep a reference to the current user in my domain model? Looking at your details, I pass the current user some kind of "ApplicationContext" object Will happen. It will be similar to ATP.NET in the form of the HTTC Contex / session or any kind of singleton form.