Esempio n. 1
0
        public static VerificationEntryDto ToDtoWithRelated(this VerificationEntry source, int level)
        {
            if (source == null)
            {
                return(null);
            }

            var target = new VerificationEntryDto();

            // Properties
            target.Id                   = source.Id;
            target.DateVerified         = source.DateVerified;
            target.DigitalCode          = source.DigitalCode;
            target.Image                = source.Image;
            target.IsManualVerification = source.IsManualVerification;
            target.AssetId              = source.AssetId;

            // Navigation Properties
            if (level > 0)
            {
                target.Asset = source.Asset.ToDtoWithRelated(level - 1);
            }

            // User-defined partial method
            OnDtoCreating(source, target);

            return(target);
        }
Esempio n. 2
0
        public static VerificationEntry ToEntity(this VerificationEntryDto source)
        {
            if (source == null)
            {
                return(null);
            }

            var target = new VerificationEntry();

            // Properties
            target.Id                   = source.Id;
            target.DateVerified         = source.DateVerified;
            target.DigitalCode          = source.DigitalCode;
            target.Image                = source.Image;
            target.IsManualVerification = source.IsManualVerification;
            target.AssetId              = source.AssetId;

            // User-defined partial method
            OnEntityCreating(source, target);

            return(target);
        }
Esempio n. 3
0
 static partial void OnEntityCreating(VerificationEntryDto source, VerificationEntry target);
Esempio n. 4
0
 static partial void OnDtoCreating(VerificationEntry source, VerificationEntryDto target);
Esempio n. 5
0
 public static VerificationEntryDto ToDto(this VerificationEntry source)
 {
     return(source.ToDtoWithRelated(0));
 }