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); }
public void Test1() { var user = new CoUser { Name = "tom", Location = { Phone = "123456", Address = "The east of queen street" } }; user.Save(); user = CoUser.FindById(user.Id); Assert.IsNotNull(user); Assert.AreEqual("tom", user.Name); Assert.AreEqual("123456", user.Location.Phone); Assert.AreEqual("The east of queen street", user.Location.Address); }