Пример #1
0
 public static IncentiveKindViewModel ToViewModel(this IncentiveKindEntity entity)
 {
     if (entity == null) throw new ArgumentNullException(nameof(entity));
     var result = new IncentiveKindViewModel();
     result.AssignFrom(entity);
     return result;
 }
Пример #2
0
 public virtual void AssignFrom(TaskIncentiveEntity entity)
 {
     if (entity == null) throw new ArgumentNullException(nameof(entity));
     this.Amount = entity.Amount;
     this.IncentiveKind = entity.IncentiveKind.ToViewModel(); 
 }