Пример #1
0
 public AnnouncementDTO(Announcement announcement)
 {
     Timestamp = announcement.Timestamp;
     Title     = announcement.Title;
     Text      = announcement.Text;
     Author    = new MemberDTO(announcement.Author);
 }
Пример #2
0
        public SessionDTO(Session session)
        {
            Id            = session.Id;
            Description   = session.Description;
            StartDateTime = session.StartDateTime;
            EndDateTime   = session.EndDateTime;
            Location      = session.Location;
            Title         = session.Title;
            Speakername   = session.Speakername;
            Externallink  = session.Externallink;
            Organiser     = new MemberDTO(session.Member);
            var lastAnnouncement = session.MostRecentAnnouncement;

            MostRecentAnnouncement     = lastAnnouncement != null ? new AnnouncementDTO(lastAnnouncement) : null;
            AvailableRegistrationSpots = session.AvailableRegistrationSpots;
            NumberOfRegistrees         = session.NumberOfRegistrees;
            NumberOfAttendees          = session.NumberOfAttendees;
            HasStarted = session.HasStarted;
            IsOpen     = session.IsOpen;
        }