Where should I create an instance? which way is better and why?
1) In the constructor?
public class UserController : Controller
{
private UnitOfWork unitofwork;
public UserController(){
unitofwork = new UnitofWork();
}
public ActionResult DoStuff(){
...
2) as a private class member?
public class UserController : Controller
{
private UnitOfWork unitofwork = new UnitofWork();
public ActionResult DoStuff(){
...