123456789101112131415161718192021222324252627 |
- using System;
- using Luticate2.Auth.Auth.DataAccess.Models;
- using Luticate2.Auth.Auth.Dbo;
- using Luticate2.Auth.Utils.Business.PartialObjectCopier;
- using Luticate2.Auth.Utils.Dbo.Fields;
- using Luticate2.Auth.Utils.Dbo.PartialObjectCopier;
- using Luticate2.Auth.Utils.Dbo.Result;
-
- namespace Luticate2.Auth.Auth.Business.PartialObjectCopier
- {
- public class LuPOCGroupsToDbo : LuPartialObjectCopier<LuGroups, LuGroupDbo>
- {
- public LuPOCGroupsToDbo(IServiceProvider serviceProvider) : base(serviceProvider)
- {
- }
-
- public override LuResult<LuGroupDbo> Copy(LuFieldDbo path, LuPartialFieldsDbo fields, LuGroups modelFrom,
- LuGroupDbo dboTo, LuPartialObjectCopierOptions options)
- {
- MayCopy(path, fields, dboTo, dbo => dbo.Id, () => modelFrom.Id);
- MayCopySubProperty(path, fields, modelFrom, dboTo, x => x.IdNavigation, x => x.Metadata, options);
- MayCopy(path, fields, dboTo, dbo => dbo.Name, () => modelFrom.Name);
-
- return LuResult<LuGroupDbo>.Ok(dboTo);
- }
- }
- }
|