Ejemplo n.º 1
0
        public App()
        {
            var unityContainer = new UnityContainer();

            unityContainer
            .ConfigureWithDbContext()
            .ConfigureWithRepository();

            var unityServiceLocator = new UnityServiceLocator(unityContainer);
            var serviceLocator      = new ServiceLocatorProvider(() => unityServiceLocator);

            ServiceLocator.SetLocatorProvider(serviceLocator);
        }