You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LuPOCGroupsToModel.cs 939B

1234567891011121314151617181920212223242526
  1. using System;
  2. using Luticate2.Auth.Business.PartialObjectCopier;
  3. using Luticate2.Auth.DataAccess.Models;
  4. using Luticate2.Auth.Dbo.Auth;
  5. using Luticate2.Auth.Dbo.Fields;
  6. using Luticate2.Auth.Dbo.PartialObjectCopier;
  7. using Luticate2.Auth.Dbo.Result;
  8. namespace Luticate2.Auth.Business.Auth.PartialObjectCopier
  9. {
  10. public class LuPOCGroupsToModel : LuPartialObjectCopier<LuGroupDbo, LuGroups>
  11. {
  12. public LuPOCGroupsToModel(IServiceProvider serviceProvider) : base(serviceProvider)
  13. {
  14. }
  15. public override LuResult<LuGroups> Copy(LuFieldDbo path, LuPartialFieldsDbo fields, LuGroupDbo dboFrom, LuGroups modelTo,
  16. LuPartialObjectCopierOptions options)
  17. {
  18. MayCopy(path, fields, modelTo, model => model.Id, () => dboFrom.Id);
  19. MayCopy(path, fields, modelTo, model => model.Name, () => dboFrom.Name);
  20. return LuResult<LuGroups>.Ok(modelTo);
  21. }
  22. }
  23. }