You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
2.5 KiB
101 lines
2.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Platform.Infrastructure.SignalRLayer.Service
|
|
{
|
|
public interface ISignalRMessage<T> where T :class
|
|
{
|
|
/// <summary>
|
|
/// 新增
|
|
/// </summary>
|
|
/// <param name="entity"></param>
|
|
/// <returns></returns>
|
|
bool Add(T entity);
|
|
|
|
/// <summary>
|
|
/// 更新
|
|
/// </summary>
|
|
/// <param name="entity"></param>
|
|
/// <returns></returns>
|
|
///
|
|
bool Update(T entity);
|
|
|
|
///// <summary>
|
|
///// 删除
|
|
///// </summary>
|
|
///// <param name="id"></param>
|
|
///// <returns></returns>
|
|
//bool Delete(string id);
|
|
|
|
/// <summary>
|
|
/// 删除
|
|
/// </summary>
|
|
/// <param name="expression"></param>
|
|
/// <returns></returns>
|
|
bool Delete(Expression<Func<T, bool>> expression);
|
|
|
|
/// <summary>
|
|
/// 查询记录条数
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
int GetTotalCount(Expression<Func<T, bool>> expression);
|
|
|
|
/// <summary>
|
|
/// 查询所有记录
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
List<T> GetAll();
|
|
|
|
List<T> GetAllByCondition(Expression<Func<T, bool>> expression);
|
|
|
|
List<T> GetAllByCondition(string condition);
|
|
|
|
|
|
/// <summary>
|
|
/// 查询单条记录
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
T GetSingal(string id);
|
|
|
|
/// <summary>
|
|
/// 根据条件查询数据
|
|
/// </summary>
|
|
/// <param name="expression">条件表达式</param>
|
|
/// <returns></returns>
|
|
T GetSingal(Expression<Func<T, bool>> expression);
|
|
|
|
T FirstOrDefault(Expression<Func<T, bool>> expression);
|
|
|
|
/*
|
|
/// <summary>
|
|
/// 查询单条已读
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
T GetSingalRead(string id);
|
|
|
|
/// <summary>
|
|
///查询所有未读记录
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
List<T> GetAllNoRead();
|
|
|
|
/// <summary>
|
|
/// 查询一个人员未读记录
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
List<T> GetAllNoReadById(string id);
|
|
|
|
int UpdateStatus(string id);
|
|
*/
|
|
//List<T> GetList
|
|
|
|
|
|
}
|
|
}
|
|
|