using Church.Net.Entity.Interface; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Linq; using System.Net.NetworkInformation; using System.Text; using System.Threading.Tasks; namespace Church.Net.DAL.EFCoreDBF.Interface { public interface ICrudDAL where T : class, IEntity { IQueryable GetDbSet(); T First(Func filter = null); T GetById(string Id); IEnumerable GetAll(Func filter = null); //IEnumerable GetAllById(IEnumerable Ids); int Create(T entity); Task CreateAsync(T entity); int CreateOrUpdate(T entity); int Update(T entity); void CreateDone(T entity); void UpdateDone(T entity); int UpdateRange(IEnumerable entities); int Delete(T obj); int Delete(Func filter); bool CheckExist(T obj); IEnumerable GetAllById(IEnumerable Ids); } public interface ICombinedKeyCrudDAL where T : class { IQueryable GetDbSet(); T First(Func filter = null); T GetById(IEnumerable combinedKeyIds); IEnumerable GetAll(Func filter = null); int Create(T entity); Task CreateAsync(T entity); int CreateOrUpdate(T entity); int Update(T entity); void CreateDone(T entity); void UpdateDone(T entity); int UpdateRange(IEnumerable entities); int Delete(T obj); int Delete(IEnumerable combinedKeyIds); int Delete(Func filter); bool CheckExist(T obj); IQueryable GetQuery(Func filter = null); } }