예제 #1
0
 public DatabaseCommandContext()
 {
     _dbContext = new BlDbContext("Server=tcp:taturevichserver.database.windows.net,1433;" +
                                  "Initial Catalog=NewDb;Persist Security Info=False;" +
                                  "User ID=ivan_taturevich;Password=Aa83386491994;" +
                                  "MultipleActiveResultSets=False;Encrypt=True;" +
                                  "TrustServerCertificate=False;Connection Timeout=30;");
 }
예제 #2
0
 public void Intercept(IInvocation invocation)
 {
     using (var context = new BlDbContext("Server=tcp:taturevichserver.database.windows.net,1433;" +
                                          "Initial Catalog=NewDb;Persist Security Info=False;" +
                                          "User ID=ivan_taturevich;Password=Aa83386491994;" +
                                          "MultipleActiveResultSets=False;Encrypt=True;" +
                                          "TrustServerCertificate=False;Connection Timeout=30;"))
     {
         invocation.Proceed();
         context.SaveChanges();
     }
 }