using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.IDAL
|
{
|
public interface IProjectDAL<T> where T : Entity.BaseEntity, new()
|
{
|
#region Query
|
|
/// <summary>
|
/// 查询全部
|
/// </summary>
|
List<T> QueryAll(long projectId);
|
|
/// <summary>
|
/// 根据 Id查询
|
/// </summary>
|
T QueryById(long projectId, long Id);
|
|
/// <summary>
|
/// 根据 Id集合查询
|
/// </summary>
|
List<T> QueryByIds(long projectId, IEnumerable<long> Ids);
|
|
#endregion
|
|
#region Insert
|
|
/// <summary>
|
/// 插入
|
/// </summary>
|
long Insert(long projectId, T rhs);
|
|
/// <summary>
|
/// 批量插入
|
/// </summary>
|
bool Inserts(long projectId, IEnumerable<T> list);
|
|
/// <summary>
|
/// 插入并返回
|
/// </summary>
|
T InsertR(long projectId, T rhs);
|
|
/// <summary>
|
/// 批量插入并返回
|
/// </summary>
|
List<long> InsertsR(long projectId, IEnumerable<T> list);
|
|
#endregion
|
|
#region Update
|
|
/// <summary>
|
/// 更新
|
/// </summary>
|
bool Update(long projectId, T rhs);
|
|
/// <summary>
|
/// 批量更新
|
/// </summary>
|
bool Updates(long projectId, IEnumerable<T> list);
|
|
#endregion
|
|
#region Delete
|
|
/// <summary>
|
/// 根据 Id删除
|
/// </summary>
|
bool DeleteById(long projectId, long Id);
|
|
/// <summary>
|
/// 根据 Id集合删除
|
/// </summary>
|
bool DeleteByIds(long projectId, IEnumerable<long> Ids);
|
|
/// <summary>
|
/// 删除
|
/// </summary>
|
bool Delete(long projectId, T rhs);
|
|
/// <summary>
|
/// 批量删除
|
/// </summary>
|
bool Deletes(long projectId, IEnumerable<T> list);
|
|
/// <summary>
|
/// 删除全部
|
/// </summary>
|
bool DeleteAll(long projectId);
|
|
#endregion
|
}
|
}
|