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 LuPOCObjectsMetadataToDbo : LuPartialObjectCopier<LuObjectsMetadata, LuObjectsMetadataDbo>
- {
- public LuPOCObjectsMetadataToDbo(IServiceProvider serviceProvider) : base(serviceProvider)
- {
- }
-
- public override LuResult<LuObjectsMetadataDbo> Copy(LuFieldDbo path, LuPartialFieldsDbo fields, LuObjectsMetadata modelFrom, LuObjectsMetadataDbo dboTo,
- LuPartialObjectCopierOptions options)
- {
- MayCopy(path, fields, dboTo, dbo => dbo.Id, () => modelFrom.Id);
- MayCopy(path, fields, dboTo, dbo => dbo.CreatedAt, () => modelFrom.CreatedAt);
- MayCopy(path, fields, dboTo, dbo => dbo.UpdatedAt, () => modelFrom.UpdatedAt);
-
- return LuResult<LuObjectsMetadataDbo>.Ok(dboTo);
- }
- }
- }
|