Beispiel #1
0
        public override void AssignFrom(PartakerEntity entity)
        {
            base.AssignFrom(entity);

            this.Task = entity.Task.ToViewModel();
            this.Staff = entity.Staff.ToViewModel();
        }
Beispiel #2
0
 public static StaffViewModel ToViewModel(this StaffEntity entity)
 {
     if (entity == null) throw new ArgumentNullException(nameof(entity));
     var result = new StaffViewModel();
     result.AssignFrom(entity);
     return result;
 }
Beispiel #3
0
        public virtual void AssignFrom(VotingEntity entity)
        {
            if (entity == null) throw new ArgumentNullException(nameof(entity));

            this.Id = entity.Id;
            this.Reason = entity.Reason;
            this.VoteOptionId = entity.Option.Id;
            this.Staff = entity.Staff.ToViewModel(); 
            this.CreatedAt = entity.CreatedAt; 
        }