From da24a13df7ed9431b438b161263a6f22beddd28b Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 31 May 2017 10:45:43 +0800 Subject: [PATCH] - --- SqlServerTest/Program.cs | 36 ++++++++++++++++----------------- SqlSugar/Entities/EntityInfo.cs | 3 ++- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/SqlServerTest/Program.cs b/SqlServerTest/Program.cs index 7db631d74..6b32030a8 100644 --- a/SqlServerTest/Program.cs +++ b/SqlServerTest/Program.cs @@ -17,28 +17,28 @@ namespace OrmTest { static void Main(string[] args) { - ///***Unit Test***/ - //new Field(1).Init(); - //new Where(1).Init(); - //new Method(1).Init(); - //new JoinQuery(1).Init(); - //new SingleQuery(1).Init(); - //new SelectQuery(1).Init(); - //new AutoClose(1).Init(); - //new Insert(1).Init(); - //new Delete(1).Init(); - //new Update(1).Init(); - //new Mapping(1).Init(); + /***Unit Test***/ + new Field(1).Init(); + new Where(1).Init(); + new Method(1).Init(); + new JoinQuery(1).Init(); + new SingleQuery(1).Init(); + new SelectQuery(1).Init(); + new AutoClose(1).Init(); + new Insert(1).Init(); + new Delete(1).Init(); + new Update(1).Init(); + new Mapping(1).Init(); - ///***Performance Test***/ - //new SqlSugarPerformance(100).Select(); + /***Performance Test***/ + new SqlSugarPerformance(100).Select(); /***Demo***/ OrmTest.Demo.Query.Init(); - //OrmTest.Demo.Insert.Init(); - //OrmTest.Demo.Delete.Init(); - //OrmTest.Demo.Update.Init(); - //OrmTest.Demo.DbFirst.Init(); + OrmTest.Demo.Insert.Init(); + OrmTest.Demo.Delete.Init(); + OrmTest.Demo.Update.Init(); + OrmTest.Demo.DbFirst.Init(); } } } diff --git a/SqlSugar/Entities/EntityInfo.cs b/SqlSugar/Entities/EntityInfo.cs index e43cf8c55..5e3830376 100644 --- a/SqlSugar/Entities/EntityInfo.cs +++ b/SqlSugar/Entities/EntityInfo.cs @@ -9,8 +9,9 @@ namespace SqlSugar { public class EntityInfo { + private string _DbTableName; public string EntityName { get; set; } - public string DbTableName { get; set; } + public string DbTableName { get { return _DbTableName == null ? EntityName : _DbTableName; } set { _DbTableName = value; } } public Type Type { get; set; } public List Columns { get; set; } }