Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ILuCrudInterface.cs 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Collections.Generic;
  3. using Luticate2.Utils.Dbo;
  4. using Luticate2.Utils.Dbo.OrderBy;
  5. namespace Luticate2.Utils.Interfaces
  6. {
  7. public interface ILuCrudInterface<TDboCreate, TDboRead, TDboUpdate>
  8. where TDboCreate : class
  9. where TDboRead : class
  10. where TDboUpdate : class
  11. {
  12. LuResult<T> Add<T>(IEnumerable<TDboCreate> objs, Func<IEnumerable<TDboRead>, T> returnFunc);
  13. LuResult<T> Add<T>(TDboCreate obj, Func<TDboRead, T> returnFunc);
  14. LuResult<IEnumerable<string>> AddGuid(IEnumerable<TDboCreate> objs);
  15. LuResult<string> AddGuid(TDboCreate obj);
  16. LuResult<IEnumerable<long>> AddId(IEnumerable<TDboCreate> obj);
  17. LuResult<long> AddId(TDboCreate obj);
  18. LuResult<IEnumerable<TDboRead>> AddDbo(IEnumerable<TDboCreate> obj);
  19. LuResult<TDboRead> AddDbo(TDboCreate obj);
  20. LuResult<TDboRead> GetSingleByKeys(params KeyValuePair<string, object>[] keys);
  21. LuResult<TDboRead> GetSingleById(string id);
  22. LuResult<TDboRead> GetSingleById(long id);
  23. LuResult<LuPaginatedDbo<TDboRead>> GetMultiple(LuOrderByDbo orderBy, int page = 0, int perPage = int.MaxValue);
  24. LuResult<T> EditSingleById<T>(long id, TDboUpdate update, Func<TDboRead, T> returnFunc);
  25. LuResult<long> EditSingleByIdId(long id, TDboUpdate update);
  26. LuResult<TDboRead> EditSingleByIdDbo(long id, TDboUpdate update);
  27. LuResult<T> EditSingleById<T>(string id, TDboUpdate update, Func<TDboRead, T> returnFunc);
  28. LuResult<string> EditSingleByIdGuid(string id, TDboUpdate update);
  29. LuResult<TDboRead> EditSingleByIdDbo(string id, TDboUpdate update);
  30. LuResult<T> DeleteSingleById<T>(string id, Func<TDboRead, T> returnFunc);
  31. LuResult<string> DeleteSingleByIdGuid(string id);
  32. LuResult<TDboRead> DeleteSingleByIdDbo(string id);
  33. LuResult<T> DeleteSingleById<T>(long id, Func<TDboRead, T> returnFunc);
  34. LuResult<long> DeleteSingleByIdId(long id);
  35. LuResult<TDboRead> DeleteSingleByIdDbo(long id);
  36. }
  37. }