示例#1
0
        public void Test()
        {
            AppDomain.CurrentDomain.SetData("DataDirectory", Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData));

            Database.SetInitializer <RemontTestContext>(new InitTestDb());
            using (RemontTestContext testcontext = new RemontTestContext())
            {
                testcontext.Database.Initialize(true);
            }
        }
示例#2
0
        public static IRemontTestContext GetInstance()
        {
            if (remontContext == null)
            {
                lock (typeof(RemontTestContext))
                {
                    if (remontContext == null)
                    {
                        remontContext = new RemontTestContext();
                    }
                }
            }

            return(remontContext);
        }