예제 #1
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="dataAry"></param>
 public static void Delete <T>(params T[] dataAry)
 {
     Static.Remove(dataAry);
 }
예제 #2
0
 /// <summary>
 /// 修改数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="oldEntity"></param>
 /// <param name="newEntity"></param>
 public static void Update <T>(Func <T, bool> where, T newEntity)
 {
     Static.Update(where, newEntity);
 }
예제 #3
0
 /// <summary>
 /// 新增数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="data"></param>
 public static void Add <T>(T data)
 {
     Static.Add(data);
 }
예제 #4
0
 /// <summary>
 /// 删除数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 public static void Remove <T>(Func <T, bool> where)
 {
     Static.Remove(where);
 }
예제 #5
0
 /// <summary>
 /// 获取第一条
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 /// <returns></returns>
 public static T FirstOrDefault <T>(Func <T, bool> where)
 {
     return(Static.FirstOrDefault(where));
 }
예제 #6
0
 /// <summary>
 /// 查询数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 /// <returns></returns>
 public static IEnumerable <T> Select <T>(Func <T, bool> where)
 {
     return(Static.Where(where));
 }
예제 #7
0
 /// <summary>
 /// 数据初始化
 /// </summary>
 /// <param name="dataAssemblyName">数据模型所在程序集名   默认当前项目所在程序集</param>
 public static void Start(string dataAssemblyName = "")
 {
     //数据初始化
     Static.Start(dataAssemblyName);
 }
예제 #8
0
 /// <summary>
 /// 是否存在
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 /// <returns></returns>
 public static bool Any <T>(Func <T, bool> where)
 {
     return(Static.Any(where));
 }
예제 #9
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <param name="pageCount"></param>
 /// <returns></returns>
 public static List <T> GetList <T>(int pageIndex, int pageSize, out int pageCount)
 {
     return(Static.GetList <T>(pageIndex, pageSize, out pageCount));
 }
예제 #10
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 /// <param name="pageIndex"></param>
 /// <param name="pageSize"></param>
 /// <param name="pageCount"></param>
 /// <returns></returns>
 public static List <T> GetList <T>(Func <T, bool> where, int pageIndex, int pageSize, out int pageCount)
 {
     return(Static.GetList(where, pageIndex, pageSize, out pageCount));
 }
예제 #11
0
 /// <summary>
 /// 获取列表
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <returns></returns>
 public static List <T> GetList <T>()
 {
     return(Static.GetList <T>());
 }
예제 #12
0
파일: Global.cs 프로젝트: qinzhixian/Part
 /// <summary>
 /// 更新数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="where"></param>
 /// <param name="entity"></param>
 public void Update <T>(Func <T, bool> where, T entity)
 {
     Static.Update(where, entity);
 }
예제 #13
0
파일: Global.cs 프로젝트: qinzhixian/Part
 /// <summary>
 /// 移除数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="data"></param>
 public void Remove <T>(params T[] data)
 {
     Static.Remove(data);
 }
예제 #14
0
파일: Global.cs 프로젝트: qinzhixian/Part
 /// <summary>
 /// 新增数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="data"></param>
 public void Add <T>(params T[] data)
 {
     Static.Add(data);
 }
예제 #15
0
파일: Global.cs 프로젝트: qinzhixian/Part
 /// <summary>
 /// 数据初始化
 /// </summary>
 /// <param name="dataAssemblyName">数据模型所在程序集名   默认当前项目所在程序集</param>
 /// <param name="dataIsEncrypt">数据是否加密</param>
 public Global(string dataAssemblyName = "", bool dataIsEncrypt = false)
 {
     //数据初始化
     Static.Start(dataAssemblyName, dataIsEncrypt);
 }