修改仓储Add方法参数
This commit is contained in:
parent
a8e6d905dc
commit
5e2fc60ba5
@ -41,9 +41,9 @@ namespace ZR.Repository
|
||||
/// </summary>
|
||||
/// <param name="t"></param>
|
||||
/// <returns></returns>
|
||||
public int Add(T t)
|
||||
public int Add(T t, bool ignoreNull = true)
|
||||
{
|
||||
return Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
|
||||
return Context.Insertable(t).IgnoreColumns(ignoreNullColumn: ignoreNull).ExecuteCommand();
|
||||
}
|
||||
|
||||
public int Insert(List<T> t)
|
||||
|
||||
@ -10,7 +10,7 @@ namespace ZR.Repository
|
||||
public interface IBaseRepository<T> : ISimpleClient<T> where T : class, new()
|
||||
{
|
||||
#region add
|
||||
int Add(T t);
|
||||
int Add(T t, bool ignoreNull = true);
|
||||
|
||||
int Insert(List<T> t);
|
||||
int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user