Exemplo n.º 1
0
        static void Main(string[] args)
        {
            _configuration = GetSettings();//
            //first changes

            _diContainer = GetDiContainer(_configuration);

            var result = String.Empty;

            using (var scope = _diContainer.BeginLifetimeScope())
            {
                _service = scope.Resolve <IService>();
                result   = _service.GetData();
            }
            Console.WriteLine(result);
            Console.ReadKey();//some
        }
Exemplo n.º 2
0
 private static IContainer GetDiContainer(Infrastructure.Configuration conf) => AutofacConfig.ConfigureContainer(conf);