Exemplo n.º 1
0
 private string GetTestUser(string name)
 {
     using (var context = new DbDataContext(_conf.ConnectionStrings.Deployer)) {
         context.Users.InsertOnSubmit(new User { Login = name, Password = name });
         context.SubmitChanges();
     }
     return name;
 }
Exemplo n.º 2
0
 public void RemoveTestData()
 {
     using (var context = new DbDataContext(_conf.ConnectionStrings.Deployer)) {
         var deploy = context.Deploys.Single(d => d.SessionKey == _conf.SessionKey);
         var user = context.Users.Single(u => u.Login == _user);
         context.Deploys.DeleteOnSubmit(deploy);
         context.Users.DeleteOnSubmit(user);
         context.SubmitChanges();
     }
 }