示例#1
0
文件: Program.cs 项目: phiree/dzdocs
        static void Main()
        {
            AppDomain.CurrentDomain.SetData("DataDirectory", @"../../App_Data");
            Database.SetInitializer(new LicenceTrackerInitializer());
            var db = new LicenceTrackerContext();
            db.People.Find(1);

            _unityContainer = new UnityContainer();

            _unityContainer.RegisterType<ISoftwareService, SoftwareService>(new TransientLifetimeManager());
            PresenterBinder.Factory = new UnityPresenterFactory(_unityContainer);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LaunchView());
        }
示例#2
0
 public SoftwareService()
 {
     licenceTrackerContext = new LicenceTrackerContext();
 }