123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- using Common.Models;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading.Tasks;
- namespace Data.Interfaces
- {
- public interface IDatabase
- {
- #region 查询
-
-
-
-
-
-
-
- IEnumerable<T> FindList<T>(string sql, object para = null) where T : class, new();
-
-
-
-
-
-
- PaginationDTO<IEnumerable<T>> FindPageList<T>(string sql, PaginationQuery pagination, object para = null) where T : class, new();
-
-
-
-
-
-
-
- PaginationDTO<IEnumerable<T>> FindPageList<T>(Expression<Func<T, bool>> condition, PaginationQuery pagination) where T : class, new();
-
-
-
-
-
-
- IEnumerable<T> FindList<T>(Expression<Func<T, bool>> condition) where T : class, new();
-
-
-
-
-
-
-
- T FindEntity<T>(string sql, object para = null);
-
-
-
-
-
-
-
- T FindEntity<T>(Expression<Func<T, bool>> condition) where T : class, new();
-
-
-
-
-
-
- int Count<T>(Expression<Func<T, bool>> condition) where T : class, new();
-
-
-
-
-
-
- int Count(string sql, object para);
- #endregion
- #region 编辑
-
-
-
-
-
- int Insert(string sql, object para = null);
-
-
-
-
-
- int Insert<T>(T model) where T : class, new();
-
-
-
-
-
- int Insert<T>(List<T> list) where T : class, new();
-
-
-
-
-
- int Update(string sql, object para = null);
-
-
-
-
-
-
- int Update<T>(T t) where T : class, new();
- #endregion
- #region 删除
-
-
-
-
-
- int Delete(string sql, object para = null);
-
-
-
-
-
-
- int Delete<T>(T t) where T : class, new();
-
-
-
-
-
-
- int Delete<T>(int id) where T : class, new();
- #endregion
- }
- }
|