12345678910111213141516171819202122232425262728 |
- using System;
- using System.Linq;
- using Luticate2.Auth.Business.PartialObjectCopier;
- using Luticate2.Auth.DataAccess.Models;
- using Luticate2.Auth.Dbo.Auth;
- using Luticate2.Auth.Dbo.Fields;
- using Luticate2.Auth.Dbo.PartialObjectCopier;
- using Luticate2.Auth.Dbo.Result;
-
- namespace Luticate2.Auth.Business.Auth.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);
- }
- }
- }
|