Пример #1
0
 public static Minute AsMinute(MinuteFullDTO minuteFullDto, Minute minuteEntity)
 {
     minuteEntity.Id = minuteFullDto.Id;
     minuteEntity.Subject = minuteFullDto.Subject;
     minuteEntity.Date = minuteFullDto.Date;
     minuteEntity.Notes = minuteFullDto.Notes;
     return minuteEntity;
 }
Пример #2
0
 public static MinuteSmallDTO FromMinuteEntity(Minute minute)
 {
     var minuteDTO = new MinuteSmallDTO(minute.Id, minute.Date, minute.Subject, BuildShortNotes(minute.Notes));
     minuteDTO.TotalAttendees = minute.Attendees != null ? minute.Attendees.Count() : 0;
     return minuteDTO;
 }
Пример #3
0
 public static MinuteFullDTO FromMinuteEntity(Minute minute)
 {
     return new MinuteFullDTO(minute.Id, minute.Date, minute.Subject, minute.Notes,
         minute.Attendees.Select(attendee => AttendeeFullDTO.FromAttendee(attendee)).ToArray());
 }
 public void AddMinute(Minute minute)
 {
     this.context.Minutes.Add(minute);
 }