12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- 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>
- 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<string>> AddGuid(IEnumerable<TDboCreate> objs);
-
- LuResult<string> AddGuid(TDboCreate obj);
-
-
- LuResult<IEnumerable<long>> AddId(IEnumerable<TDboCreate> obj);
-
- LuResult<long> AddId(TDboCreate obj);
-
- LuResult<IEnumerable<TDboRead>> AddDbo(IEnumerable<TDboCreate> obj);
-
- LuResult<TDboRead> AddDbo(TDboCreate obj);
-
-
-
-
- LuResult<TDboRead> GetSingleById(string id);
-
- LuResult<TDboRead> GetSingleById(long 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>(long id, TDboUpdate update, Func<TDboRead, T> returnFunc);
-
- LuResult<long> EditSingleByIdId(long id, TDboUpdate update);
-
- LuResult<TDboRead> EditSingleByIdDbo(long id, TDboUpdate update);
-
-
- LuResult<T> EditSingleById<T>(string id, TDboUpdate update, Func<TDboRead, T> returnFunc);
-
- LuResult<string> EditSingleByIdGuid(string id, TDboUpdate update);
-
- LuResult<TDboRead> EditSingleByIdDbo(string id, TDboUpdate update);
-
-
-
-
- LuResult<T> DeleteSingleById<T>(string id, Func<TDboRead, T> returnFunc);
-
- LuResult<string> DeleteSingleByIdGuid(string id);
-
- LuResult<TDboRead> DeleteSingleByIdDbo(string id);
-
-
- LuResult<T> DeleteSingleById<T>(long id, Func<TDboRead, T> returnFunc);
-
- LuResult<long> DeleteSingleByIdId(long id);
-
- LuResult<TDboRead> DeleteSingleByIdDbo(long id);
- }
- }
|