SHARE
TWEET

Untitled

a guest Jun 20th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ConversionRate
  2.     {
  3.         [Key]
  4.         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  5.         public long Id { get; set; }
  6.  
  7.         [Required]
  8.         public string FromCurrency { get; set; }
  9.  
  10.         [Required]
  11.         public string ToCurrency { get; set; }
  12.  
  13.         [Required]
  14.         [Range(0, 100000)]
  15.         public double Value { get; set; }
  16.  
  17.         [Required]
  18.         public DateTime Date { get; set; }
  19.  
  20.         [ForeignKey("ProviderId")]
  21.         public Provider Provider { get; set; }
  22.         public int ProviderId { get; set; }
  23.     }
  24.      
  25. public class RateDto
  26.     {
  27.         public DateTime Date { get; set; }
  28.         public double Value { get; set; }
  29.     }
  30.      
  31. public class ConversionRateProfile : Profile
  32.     {
  33.         public ConversionRateProfile()
  34.         {
  35.             CreateMap<ConversionRate, RateDto>();
  36.             CreateMap<RateDto, ConversionRate>();
  37.  
  38.         }
  39.     }
  40.      
  41. Unmapped properties:
  42. Id
  43. FromCurrency
  44. ToCurrency
  45. Provider
  46. ProviderId
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top