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