public MainWindow() { InitializeComponent(); var repository = new MemoryBlogPostRepository(); DataContext = new ApplicationViewModel(repository); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); var blogPostRepository = new MemoryBlogPostRepository(); ControllerBuilder.Current.SetControllerFactory(new StandardControllerFactory(blogPostRepository)); }
public App() { var repository = new MemoryBlogPostRepository(); var applicationViewModel = new ApplicationViewModel(repository); var defaultFactory = new BlogPostSelectorPageFactory(); var factory = new DummyBlogPostSelectorPageFactory(defaultFactory); MainPage = new ApplicationMasterDetailPage(applicationViewModel, defaultFactory); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); var blogPostRepository = new MemoryBlogPostRepository(); var userManager = new UserManager <IdentityUser>(new UserStore <IdentityUser>()) { PasswordValidator = new MinimumLengthValidator(4) }; ControllerBuilder.Current.SetControllerFactory(new StandardControllerFactory(blogPostRepository)); }