public void Single_Table_inheritance_TPH() { var buyer = new Buyers(Guid.NewGuid().ToString("N")); buyer.Sex = 1; buyer.Sex2 = 2; buyer.Tel = "123"; buyer.UName = "zhangsan"; Assert.AreEqual(true, buyer.Validator().Success); var buyerRepository = LocalServiceLocator.GetService <IBuyersRepository>(); buyerRepository.Add(buyer); var result = buyerRepository.Context.Commit(); Assert.AreEqual(1, result.ResultData); }