12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System;
- using System.Collections.Generic;
- using Luticate2.Utils.Dbo;
- 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);
- }
- }
|