From efe4233125a9e8d13beb0457bfc8c065d10eb2e6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 24 May 2017 15:48:28 +0800 Subject: [PATCH] - --- SqlSugar/SqlSugarClient.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SqlSugar/SqlSugarClient.cs b/SqlSugar/SqlSugarClient.cs index a2ebae3d7..f74878443 100644 --- a/SqlSugar/SqlSugarClient.cs +++ b/SqlSugar/SqlSugarClient.cs @@ -135,7 +135,7 @@ namespace SqlSugar { var result = InstanceFactory.GetQueryable(base.CurrentConnectionConfig); var sqlBuilder = InstanceFactory.GetSqlbuilder(base.CurrentConnectionConfig); - result.Context = this;; + result.Context = this; ; result.SqlBuilder = sqlBuilder; result.SqlBuilder.QueryBuilder = InstanceFactory.GetQueryBuilder(base.CurrentConnectionConfig); result.SqlBuilder.QueryBuilder.Builder = sqlBuilder; @@ -301,6 +301,10 @@ namespace SqlSugar { return this.Updateable(new T[] { UpdateObj }); } + public virtual IUpdateable Updateable() where T : class, new() + { + return this.Updateable(new T[] { new T() }); + } #endregion #region DbFirst @@ -348,7 +352,7 @@ namespace SqlSugar } return base._DbMaintenance; } - } + } #endregion #region Entity Methods