public void Test2() { var user = new CoUser { Name = "tom", Location = { Phone = "123456", Address = "The east of queen street" } }; user.Save(); user = CoUser.FindById(user.Id); user.Location.Address = "test"; user.Save(); user = CoUser.FindById(user.Id); Assert.AreEqual("test", user.Location.Address); }
public void TestQuery() { var user = new CoUser { Name = "tom", Location = { Phone = "123456", Address = "The east of queen street" } }; user.Save(); var ru = CoUser.FindOne(p => p.Location.Phone == "123456"); Assert.AreEqual("The east of queen street", ru.Location.Address); }