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; }
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; }
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); }