In my controller class, should i create a new instance of UnitOfWork in every method or should i have a class instance that the methods access?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After examining the way controllers behave with dispose, my conclusion is that it doesnt matter. But i think a class instance looks cleaner since the class gets disposed after every GET/POST.