123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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<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, 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);
- }
- }
|