static void Main(string[] args) { var container = ContainerService.GetDiContainer(); using (var appScope = container.BeginLifetimeScope()) { var app = appScope.Resolve <IApp>(); app.Run(); } Console.ReadLine(); }