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); }
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); }
static partial void OnEntityCreating(VerificationEntryDto source, VerificationEntry target);
static partial void OnDtoCreating(VerificationEntry source, VerificationEntryDto target);
public static VerificationEntryDto ToDto(this VerificationEntry source) { return(source.ToDtoWithRelated(0)); }