12345678910111213141516171819202122232425 |
- using SnapshotWinFormsApp.Entities.NewHotline;
- using SqlSugar;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace SnapshotWinFormsApp.Repository.Interfaces;
- public interface IRepository<T> where T : class, new()
- {
- ISugarQueryable<T> Queryable();
- T GetById(int id);
- List<T> GetAll();
- }
- public interface IBaseRepository<T> where T : Entity, new()
- {
- ISugarQueryable<T> Queryable();
- T GetById(int id);
- Task<List<T>> GetAllAsync(CancellationToken token);
- Task<string> InsertAsync(T entity, CancellationToken token);
- void Update(T entity);
- }
|