BaseRepository新增update方法
This commit is contained in:
parent
72b2166e40
commit
92755a26c8
@ -120,7 +120,10 @@ namespace ZR.Repository
|
|||||||
#endregion add
|
#endregion add
|
||||||
|
|
||||||
#region update
|
#region update
|
||||||
|
public IUpdateable<T> Updateable(T entity)
|
||||||
|
{
|
||||||
|
return Context.Updateable(entity);
|
||||||
|
}
|
||||||
public int Update(T entity, bool ignoreNullColumns = false)
|
public int Update(T entity, bool ignoreNullColumns = false)
|
||||||
{
|
{
|
||||||
return Context.Updateable(entity).IgnoreColumns(ignoreNullColumns).ExecuteCommand();
|
return Context.Updateable(entity).IgnoreColumns(ignoreNullColumns).ExecuteCommand();
|
||||||
@ -132,7 +135,7 @@ namespace ZR.Repository
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据实体类更新 eg:Update(dept, it => new { it.Status }, f => depts.Contains(f.DeptId));只更新Status列,条件是包含
|
/// 根据实体类更新指定列 eg:Update(dept, it => new { it.Status }, f => depts.Contains(f.DeptId));只更新Status列,条件是包含
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity"></param>
|
/// <param name="entity"></param>
|
||||||
/// <param name="expression"></param>
|
/// <param name="expression"></param>
|
||||||
|
|||||||
@ -43,7 +43,7 @@ namespace ZR.Repository
|
|||||||
#endregion add
|
#endregion add
|
||||||
|
|
||||||
#region update
|
#region update
|
||||||
|
IUpdateable<T> Updateable(T entity);
|
||||||
int Update(T entity, bool ignoreNullColumns = false);
|
int Update(T entity, bool ignoreNullColumns = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user