diff --git a/ZR.Repository/BaseRepository.cs b/ZR.Repository/BaseRepository.cs
index a5c3f17..26dcf40 100644
--- a/ZR.Repository/BaseRepository.cs
+++ b/ZR.Repository/BaseRepository.cs
@@ -41,9 +41,9 @@ namespace ZR.Repository
///
///
///
- 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)
diff --git a/ZR.Repository/IBaseRepository.cs b/ZR.Repository/IBaseRepository.cs
index 25aa897..640612f 100644
--- a/ZR.Repository/IBaseRepository.cs
+++ b/ZR.Repository/IBaseRepository.cs
@@ -10,7 +10,7 @@ namespace ZR.Repository
public interface IBaseRepository : ISimpleClient where T : class, new()
{
#region add
- int Add(T t);
+ int Add(T t, bool ignoreNull = true);
int Insert(List t);
int Insert(T parm, Expression> iClumns = null, bool ignoreNull = true);