Inheritance: BaseEntityDTO
Esempio 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);
 }
Esempio 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;
        }
Esempio 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);
 }