예제 #1
0
        public void TestGet()
        {
            HelloContext helloContext = new HelloContext();
            User user = helloContext.Users.Include("Movements").First();

            Assert.AreEqual(typeof(User), user.GetType());
        }
예제 #2
0
        public void TestCreate()
        {
            HelloContext helloContext = new HelloContext();

            User user = new User();
            user.Nombre = "Nico";

            Movement movement = new Movement();
            movement.CreationTime = DateTime.Now;

            user.Movements.Add(movement);

            helloContext.Users.Add(user);

            helloContext.SaveChanges();
        }
예제 #3
0
 public void InitializeDatabse()
 {
     HelloContext helloContext = new HelloContext();
     HelloContextInitializaer helloContextInitializaer = new HelloContextInitializaer();
     helloContextInitializaer.InitializeDatabase(helloContext);
 }