public ActionResult Index() { var domainObject = new MyDomainObject(); var task = new MyTask(); task.DoSomething(domainObject); return View(); }
public MainWindow() { InitializeComponent(); var domainObject = new MyDomainObject(); var task = new MyTask(); task.DoSomething(domainObject); }