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); } }
public static IRemontTestContext GetInstance() { if (remontContext == null) { lock (typeof(RemontTestContext)) { if (remontContext == null) { remontContext = new RemontTestContext(); } } } return(remontContext); }