static private void InsertProject() { Random rnd = new Random(); var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" }; var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() }; //var behavioralTestType = null;// NHibernateHelper.OpenSession().Get<BehavioralTestType>(1); var behavioralTest = new BehavioralTest { Name = "first test", Project = project }; project.AddBehavioralTest(behavioralTest); researcher.AddProject(project); researcher.Save(); }
static private void InsertProject() { Random rnd = new Random(); var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" }; var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() }; var behavioralTestType = NHibernateHelper.OpenSession().Get <BehavioralTestType>(1); var behavioralTest = new BehavioralTest { Name = "first test", Project = project, BehavioralTestType = behavioralTestType }; project.AddBehavioralTest(behavioralTest); researcher.AddProject(project); researcher.Save(); System.Console.WriteLine("inserted new researcher with project!"); FindResearcherById((int)researcher.Id); }
private static void InsertProject() { Random rnd = new Random(); var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" }; var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() }; //var behavioralTestType = null;// NHibernateHelper.OpenSession().Get<BehavioralTestType>(1); var behavioralTest = new BehavioralTest { Name = "first test", Project = project }; project.AddBehavioralTest(behavioralTest); researcher.AddProject(project); researcher.Save(); }
private static void InsertProject() { Random rnd = new Random(); var researcher = new Researcher { Username = "******" + rnd.Next(1, 10000).ToString(), Password = "******" }; var project = new Project { Name = "my project" + rnd.Next(1, 10000).ToString() }; var behavioralTestType = NHibernateHelper.OpenSession().Get<BehavioralTestType>(1); var behavioralTest = new BehavioralTest { Name = "first test", Project = project, BehavioralTestType = behavioralTestType}; project.AddBehavioralTest(behavioralTest); researcher.AddProject(project); researcher.Save(); System.Console.WriteLine("inserted new researcher with project!"); FindResearcherById((int)researcher.Id); }