using System; using System.Collections.Generic; using Luticate2.Utils.Dbo; using Luticate2.Utils.Dbo.Basic; using Luticate2.Utils.Dbo.OrderBy; using Luticate2.Utils.Dbo.Result; namespace Luticate2.Utils.Interfaces { public interface ILuCrudInterface where TDboCreate : class where TDboRead : class where TDboUpdate : class { LuResult Add(IEnumerable objs, Func, T> returnFunc); LuResult Add(TDboCreate obj, Func returnFunc); LuResult> AddGuid(IEnumerable objs); LuResult AddGuid(TDboCreate obj); LuResult> AddId(IEnumerable obj); LuResult AddId(TDboCreate obj); LuResult> AddDbo(IEnumerable obj); LuResult AddDbo(TDboCreate obj); LuResult GetSingleById(string id); LuResult GetSingleById(long id); LuResult> GetMultiple(LuOrderByDbo orderBy, int page = 0, int perPage = int.MaxValue); LuResult EditSingleById(long id, TDboUpdate update, Func returnFunc); LuResult EditSingleByIdId(long id, TDboUpdate update); LuResult EditSingleByIdDbo(long id, TDboUpdate update); LuResult EditSingleById(string id, TDboUpdate update, Func returnFunc); LuResult EditSingleByIdGuid(string id, TDboUpdate update); LuResult EditSingleByIdDbo(string id, TDboUpdate update); LuResult DeleteSingleById(string id, Func returnFunc); LuResult DeleteSingleByIdGuid(string id); LuResult DeleteSingleByIdDbo(string id); LuResult DeleteSingleById(long id, Func returnFunc); LuResult DeleteSingleByIdId(long id); LuResult DeleteSingleByIdDbo(long id); } }