/// <summary> /// Keeps the dependency injection configurations that will be used by the app. /// </summary> /// <returns><see cref="IContainer"/>Autofac dependency container.</returns> public IContainer Bootstrap() { var builder = new ContainerBuilder(); builder.RegisterType <MainWindow>().AsSelf(); builder.RegisterType <MainViewModel>().AsSelf(); builder.RegisterType <DrawerViewModel>().As <IDrawerViewModel>(); builder.RegisterType <ToDoViewModel>().As <IToDoViewModel>(); builder.Register(x => new AutoMapperConfiguration().Configure().CreateMapper()).As <IMapper>(); builder.AddAppServices(); return(builder.Build()); }