public void TestMethod_BatchInsert_T() { List <UserTestEntity> userEntities = new List <UserTestEntity>(); for (int i = 0; i < 100; i++) { UserTestEntity user = new UserTestEntity { Name = "小师弟", Age = 18, Sex = 1, Description = "测试实体插入", Mobile = "15890909090" }; user.Create(); userEntities.Add(user); } BaseBLL <UserTestEntity> bll = new BaseBLL <UserTestEntity>(); int res = bll.AddList(userEntities); Console.WriteLine("执行结果:{0}", res); }