Inheritance: BaseEntityDTO
Exemplo n.º 1
0
 public EventDTO Add(EventDTO eventToAdd)
 {
     Event newEvent = new Event();
     newEvent.Update(eventToAdd);
     uow.EventRepo.Insert(newEvent);
     uow.Commit();
     return DTOService.ToDTO<Event, EventDTO>(newEvent);
 }
Exemplo n.º 2
0
        public static void Update(this Event destination, EventDTO source)
        {
            destination.Description = source.Description;
            destination.EventDate = source.EventDate;
            destination.ResponsibleId = source.ResponsibleId;

            destination.CandidateId = source.CandidateId;
            destination.VacancyId = source.VacancyId;
            destination.EventTypeId = source.EventTypeId;
        }
Exemplo n.º 3
0
 public EventDTO Update(EventDTO eventToChange)
 {
     Event domainEvent = uow.EventRepo.GetByID(eventToChange.Id);
     domainEvent.Update(eventToChange);
     uow.EventRepo.Update(domainEvent);
     uow.Commit();
     return DTOService.ToDTO<Event, EventDTO>(domainEvent);
 }