public void Create_ConferenceWithTalkInMorning_ReturnsConference()
        {
            // Arrange
            var conferenceId = Guid.NewGuid();
            var trackId      = Guid.NewGuid();
            var talkId       = Guid.NewGuid();

            var conferenceIdObj        = ConferenceId.Create(conferenceId).Data;
            var trackIdObj             = TrackId.Create(trackId).Data;
            var talkIdObj              = TalkId.Create(talkId).Data;
            var title                  = Title.Create("First talk").Data;
            var description            = Description.Create("This is the first talk").Data;
            var duration               = Duration.Create(TimeSpan.FromMinutes(30)).Data;        // 30 minutes
            var morningSessionDateTime = TalkStartTime.Create(DateTime.Today.AddHours(9)).Data; // 9AM

            var conference = Conference.Create(conferenceIdObj).Data;

            conference.AddTrack(trackIdObj);

            // Act
            var addTalkToTrackResult = conference.AddTalkToTrack(trackIdObj, talkIdObj, title, description, duration);

            // Assert
            Assert.IsTrue(addTalkToTrackResult.IsSuccess);
            var talkAddedToTrackEvent = conference.Events.OfType <TalkAddedToTrack>().FirstOrDefault();

            Assert.IsNotNull(talkAddedToTrackEvent);
            Assert.AreEqual(trackIdObj, talkAddedToTrackEvent.TrackId);
            Assert.AreEqual(talkIdObj, talkAddedToTrackEvent.TalkId);
            Assert.AreEqual(morningSessionDateTime, talkAddedToTrackEvent.StartTime);
            Assert.IsNull(addTalkToTrackResult.Error);
        }
        public void Create_ConferenceWithTrack_ReturnsConference()
        {
            // Arrange
            var conferenceId             = Guid.NewGuid();
            var trackId                  = Guid.NewGuid();
            var createConferenceIdResult = ConferenceId.Create(conferenceId);
            var createTrackIdResult      = TrackId.Create(trackId);
            var createConferenceResult   = Conference.Create(createConferenceIdResult.Data);
            var conference               = createConferenceResult.Data;

            // Act
            var addTrackResult = conference.AddTrack(createTrackIdResult.Data);

            // Assert
            Assert.IsNotNull(addTrackResult.Data);
            var trackCreated = conference.Events.OfType <TrackCreated>().FirstOrDefault();

            Assert.IsNotNull(trackCreated);
            Assert.AreEqual(createTrackIdResult.Data, trackCreated.TrackId);

            var trackAddedToConference = conference.Events.OfType <TrackAddedToConference>().FirstOrDefault();

            Assert.IsNotNull(trackAddedToConference);
            Assert.AreEqual(createTrackIdResult.Data, trackAddedToConference.TrackId);
            Assert.AreEqual(conference.ConferenceId, trackAddedToConference.ConferenceId);
            Assert.AreEqual(1, conference.GetTracks().Count);
        }
        public void Create_ConferenceWithTalkInAfternoon_ReturnsConference()
        {
            // Arrange
            var conferenceId    = Guid.NewGuid();
            var trackId         = Guid.NewGuid();
            var talkIdAfternoon = Guid.NewGuid();

            var conferenceIdObj = ConferenceId.Create(conferenceId).Data;
            var conference      = Conference.Create(conferenceIdObj).Data;
            var trackIdObj      = TrackId.Create(trackId).Data;

            conference.AddTrack(trackIdObj);

            AddTalkToTrack(conference, trackIdObj, Guid.NewGuid(), "Morning - 1", "1st Morning Session 60 mins", 60);
            AddTalkToTrack(conference, trackIdObj, Guid.NewGuid(), "Morning - 2", "2nd Morning Session 60 mins", 60);
            AddTalkToTrack(conference, trackIdObj, Guid.NewGuid(), "Morning - 3", "3rd Morning Session 60 mins", 60);

            var talkIdObjAfternoon   = TalkId.Create(talkIdAfternoon).Data;
            var titleAfternoon       = Title.Create("Afternoon talk").Data;
            var descriptionAfternoon = Description.Create("This is the Afternoon talk").Data;
            var durationAfternoon    = Duration.Create(TimeSpan.FromMinutes(45)).Data;         // 45 mins
            var startTimeAfternoon   = TalkStartTime.Create(DateTime.Today.AddHours(13)).Data; // 1PM

            // Act
            var afternoonTalkAddedToTrackEventResult = conference.AddTalkToTrack(trackIdObj, talkIdObjAfternoon, titleAfternoon, descriptionAfternoon, durationAfternoon);

            // Assert
            Assert.IsTrue(afternoonTalkAddedToTrackEventResult.IsSuccess);
            var talkAddedToTrackEvent = conference.Events.OfType <TalkAddedToTrack>().LastOrDefault();

            Assert.IsNotNull(talkAddedToTrackEvent);
            Assert.AreEqual(trackIdObj, talkAddedToTrackEvent.TrackId);
            Assert.AreEqual(talkIdObjAfternoon, talkAddedToTrackEvent.TalkId);
            Assert.AreEqual(startTimeAfternoon, talkAddedToTrackEvent.StartTime);
        }
Exemplo n.º 4
0
 public AgendaTrack(AggregateId id, ConferenceId conferenceId, string name, ICollection <AgendaSlot> slots
                    , int version = 0) : this(id, conferenceId)
 {
     Name    = name;
     _slots  = slots.ToHashSet();
     Version = version;
 }
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "userid": // Int
                return(UserId.ToString(strFormat, formatProvider));

            case "status": // Int
                return(Status.ToString(strFormat, formatProvider));

            case "receivenotifications": // Bit
                return(ReceiveNotifications.ToString());

            case "company": // NVarChar
                if (Company == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Company, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 6
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "commentid": // Int
                return(CommentId.ToString(strFormat, formatProvider));

            case "userid": // Int
                return(UserId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "sessionid": // Int
                return(SessionId.ToString(strFormat, formatProvider));

            case "datime": // DateTime
                return(Datime.ToString(strFormat, formatProvider));

            case "remarks": // NVarCharMax
                return(PropertyAccess.FormatString(Remarks, strFormat));

            case "visibility": // Int
                return(Visibility.ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 7
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "apikey": // VarChar
                return(PropertyAccess.FormatString(ApiKey, strFormat));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "expires": // DateTime
                if (Expires == null)
                {
                    return("");
                }
                ;
                return(((DateTime)Expires).ToString(strFormat, formatProvider));

            case "createdbyuserid": // Int
                return(CreatedByUserID.ToString(strFormat, formatProvider));

            case "createdondate": // DateTime
                return(CreatedOnDate.ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 8
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "slotid": // Int
                return(SlotId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "start": // Time
                return(Start.ToString(strFormat, formatProvider));

            case "durationmins": // Int
                return(DurationMins.ToString(strFormat, formatProvider));

            case "slottype": // Int
                return(SlotType.ToString(strFormat, formatProvider));

            case "title": // NVarChar
                if (Title == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Title, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "daynr": // Int
                if (DayNr == null)
                {
                    return("");
                }
                ;
                return(((int)DayNr).ToString(strFormat, formatProvider));

            case "locationid": // Int
                if (LocationId == null)
                {
                    return("");
                }
                ;
                return(((int)LocationId).ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "locationid": // Int
                return(LocationId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "name": // NVarChar
                if (Name == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Name, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "capacity": // Int
                if (Capacity == null)
                {
                    return("");
                }
                ;
                return(((int)Capacity).ToString(strFormat, formatProvider));

            case "sort": // Int
                if (Sort == null)
                {
                    return("");
                }
                ;
                return(((int)Sort).ToString(strFormat, formatProvider));

            case "backgroundcolor": // NVarChar
                if (BackgroundColor == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(BackgroundColor, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 10
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "userid": // Int
                return(UserId.ToString(strFormat, formatProvider));

            case "company": // NVarChar
                if (Company == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Company, strFormat));

            case "sort": // Int
                if (Sort == null)
                {
                    return("");
                }
                ;
                return(((int)Sort).ToString(strFormat, formatProvider));

            case "url": // NVarChar
                if (Url == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Url, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "descriptionshort": // NVarCharMax
                if (DescriptionShort == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(DescriptionShort, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 11
0
        public static AgendaTrack Create(AggregateId id, ConferenceId conferenceId, string name)
        {
            var agendaTrack = new AgendaTrack(id, conferenceId);

            agendaTrack.ChangeName(name);
            agendaTrack.ClearEvents();
            agendaTrack.Version = 0;

            return(agendaTrack);
        }
Exemplo n.º 12
0
 public CallForPapers(AggregateId id, ConferenceId conferenceId, DateTime @from, DateTime to, bool isOpened,
                      int version = 0)
 {
     Id           = id;
     ConferenceId = conferenceId;
     From         = @from;
     To           = to;
     IsOpened     = isOpened;
     Version      = version;
 }
Exemplo n.º 13
0
 public AgendaItem(AggregateId id, ConferenceId conferenceId, string title, string description, int level,
                   IEnumerable <string> tags, ICollection <Speaker> speakers, int version = 0)
 {
     Id           = id;
     ConferenceId = conferenceId;
     Title        = title;
     Description  = description;
     Level        = level;
     Tags         = tags;
     _speakers    = speakers;
     Version      = version;
 }
Exemplo n.º 14
0
 public Submission(AggregateId id, ConferenceId conferenceId, string title, string descriptionTitle, int level,
                   string status,
                   IEnumerable <string> tags, ICollection <Speaker> speakers, int version = 0) : this(id, conferenceId)
 {
     ConferenceId     = conferenceId;
     Title            = title;
     DescriptionTitle = descriptionTitle;
     Level            = level;
     Status           = status;
     Tags             = tags;
     _speakers        = speakers;
     Version          = version;
 }
Exemplo n.º 15
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "sponsorid": // Int
                return(SponsorId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "name": // NVarChar
                return(PropertyAccess.FormatString(Name, strFormat));

            case "url": // VarChar
                if (Url == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Url, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "vieworder": // Int
                return(ViewOrder.ToString(strFormat, formatProvider));

            case "sponsorlevel": // NVarChar
                if (SponsorLevel == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(SponsorLevel, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 16
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "tagid": // Int
                return(TagId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "tagname": // NVarChar
                return(PropertyAccess.FormatString(TagName, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
        public void Create_EmptyConferenceWithId_ReturnsConference()
        {
            // Arrange
            var id = Guid.NewGuid();
            var createConferenceIdResult = ConferenceId.Create(id);

            // Act
            var createConferenceResult = Conference.Create(createConferenceIdResult.Data);

            // Assert
            var conference = createConferenceResult.Data;

            Assert.AreEqual(createConferenceIdResult.Data, conference.ConferenceId);
            Assert.AreEqual(0, conference.GetTracks().Count);

            var firstEvent = conference.Events.OfType <ConferenceCreated>().FirstOrDefault();

            Assert.AreEqual(typeof(ConferenceCreated), firstEvent.GetType());
            Assert.AreEqual(conference.ConferenceId, firstEvent.Id);
        }
Exemplo n.º 18
0
        public override string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "title": // NVarChar
                if (Title == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Title, strFormat));

            case "tagname": // NVarChar
                return(PropertyAccess.FormatString(TagName, strFormat));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            default:
                return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound));
            }
        }
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "portalid": // Int
                return(PortalId.ToString(strFormat, formatProvider));

            case "name": // NVarChar
                return(PropertyAccess.FormatString(Name, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "startdate": // DateTime
                if (StartDate == null)
                {
                    return("");
                }
                ;
                return(((DateTime)StartDate).ToString(strFormat, formatProvider));

            case "enddate": // DateTime
                if (EndDate == null)
                {
                    return("");
                }
                ;
                return(((DateTime)EndDate).ToString(strFormat, formatProvider));

            case "maxcapacity": // Int
                if (MaxCapacity == null)
                {
                    return("");
                }
                ;
                return(((int)MaxCapacity).ToString(strFormat, formatProvider));

            case "sessionvoting": // Bit
                return(SessionVoting.ToString());

            case "attendeerole": // Int
                return(AttendeeRole.ToString(strFormat, formatProvider));

            case "speakerrole": // Int
                return(SpeakerRole.ToString(strFormat, formatProvider));

            case "location": // NVarChar
                if (Location == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Location, strFormat));

            case "url": // NVarChar
                if (Url == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Url, strFormat));

            case "submittedsessionspublic": // Bit
                return(SubmittedSessionsPublic.ToString());

            case "timezoneid": // VarChar
                if (TimeZoneId == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(TimeZoneId, strFormat));

            case "mqttbroker": // VarChar
                if (MqttBroker == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(MqttBroker, strFormat));

            case "mqttbrokerusername": // NVarChar
                if (MqttBrokerUsername == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(MqttBrokerUsername, strFormat));

            case "mqttbrokerpassword": // NVarChar
                if (MqttBrokerPassword == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(MqttBrokerPassword, strFormat));

            case "basetopicpath": // NVarChar
                if (BaseTopicPath == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(BaseTopicPath, strFormat));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 20
0
 /// <summary>
 /// An event raised when a conference is created
 /// </summary>
 /// <param name="id">Unique identity of the conference</param>
 public ConferenceCreated(ConferenceId id)
 {
     Id = id;
 }
Exemplo n.º 21
0
 public override void SerializeTo(IDictionary <string, string> serializableInfo)
 {
     serializableInfo.Add("ConferenceId", ConferenceId.ToString());
     serializableInfo.Add("ReservationId", ReservationId.ToString());
 }
Exemplo n.º 22
0
        public virtual string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "sessionid": // Int
                return(SessionId.ToString(strFormat, formatProvider));

            case "conferenceid": // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "locationid": // Int
                if (LocationId == null)
                {
                    return("");
                }
                ;
                return(((int)LocationId).ToString(strFormat, formatProvider));

            case "level": // NVarChar
                if (Level == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Level, strFormat));

            case "sort": // Int
                if (Sort == null)
                {
                    return("");
                }
                ;
                return(((int)Sort).ToString(strFormat, formatProvider));

            case "capacity": // Int
                if (Capacity == null)
                {
                    return("");
                }
                ;
                return(((int)Capacity).ToString(strFormat, formatProvider));

            case "slotid": // Int
                return(SlotId.ToString(strFormat, formatProvider));

            case "title": // NVarChar
                if (Title == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Title, strFormat));

            case "subtitle": // NVarChar
                if (SubTitle == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(SubTitle, strFormat));

            case "description": // NVarCharMax
                if (Description == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Description, strFormat));

            case "status": // Int
                if (Status == null)
                {
                    return("");
                }
                ;
                return(((int)Status).ToString(strFormat, formatProvider));

            case "isplenary": // Bit
                return(IsPlenary.ToString());

            case "daynr": // Int
                return(DayNr.ToString(strFormat, formatProvider));

            case "notes": // NVarCharMax
                if (Notes == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Notes, strFormat));

            case "trackid": // Int
                if (TrackId == null)
                {
                    return("");
                }
                ;
                return(((int)TrackId).ToString(strFormat, formatProvider));

            default:
                propertyNotFound = true;
                break;
            }

            return(Null.NullString);
        }
Exemplo n.º 23
0
 public async Task <bool> ExistsAsync(ConferenceId conferenceId)
 => await _callForPapers.AnyAsync(cfp => cfp.ConferenceId == conferenceId);
Exemplo n.º 24
0
 internal AgendaTrack(AggregateId id, ConferenceId conferenceId)
 {
     Id           = id;
     ConferenceId = conferenceId;
 }
Exemplo n.º 25
0
 public Submission(AggregateId id, ConferenceId conferenceId)
 => (Id, ConferenceId) = (id, conferenceId);
 /// <summary>
 /// Initializes an instance of <c>TrackAddedToConference</c>
 /// </summary>
 /// <param name="trackId">Unique identity of the track</param>
 /// <param name="conferenceId">Unique identity of conference</param>
 public TrackAddedToConference(TrackId trackId, ConferenceId conferenceId)
 {
     TrackId      = trackId;
     ConferenceId = conferenceId;
 }
Exemplo n.º 27
0
 internal AgendaItem(AggregateId id, ConferenceId conferenceId)
 => (Id, ConferenceId) = (id, conferenceId);
Exemplo n.º 28
0
 public async Task <IEnumerable <AgendaTrack> > BrowseAsync(ConferenceId conferenceId)
 => await _agendaTracks.AsNoTracking().Include(at => at.Slots)
 .Where(at => at.ConferenceId == conferenceId).ToListAsync();
        public override string GetProperty(string strPropertyName, string strFormat, System.Globalization.CultureInfo formatProvider, DotNetNuke.Entities.Users.UserInfo accessingUser, DotNetNuke.Services.Tokens.Scope accessLevel, ref bool propertyNotFound)
        {
            switch (strPropertyName.ToLower())
            {
            case "title":     // NVarChar
                if (Title == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Title, strFormat));

            case "conferenceid":     // Int
                return(ConferenceId.ToString(strFormat, formatProvider));

            case "sessiondateandtime":     // DateTime
                if (SessionDateAndTime == null)
                {
                    return("");
                }
                ;
                return(((DateTime)SessionDateAndTime).ToString(strFormat, formatProvider));

            case "sessionend":     // DateTime
                if (SessionEnd == null)
                {
                    return("");
                }
                ;
                return(((DateTime)SessionEnd).ToString(strFormat, formatProvider));

            case "displayname":     // NVarChar
                return(PropertyAccess.FormatString(DisplayName, strFormat));

            case "email":     // NVarChar
                if (Email == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Email, strFormat));

            case "company":     // NVarChar
                if (Company == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(Company, strFormat));

            case "attcode":     // NVarChar
                if (AttCode == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(AttCode, strFormat));

            case "sessionattendeename":     // NVarChar
                return(PropertyAccess.FormatString(SessionAttendeeName, strFormat));

            case "reviewstars": // Int
                return(ReviewStars.ToString(strFormat, formatProvider));

            case "createdbyuser":     // NVarChar
                if (CreatedByUser == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(CreatedByUser, strFormat));

            case "lastmodifiedbyuser":     // NVarChar
                if (LastModifiedByUser == null)
                {
                    return("");
                }
                ;
                return(PropertyAccess.FormatString(LastModifiedByUser, strFormat));

            default:
                return(base.GetProperty(strPropertyName, strFormat, formatProvider, accessingUser, accessLevel, ref propertyNotFound));
            }
        }
Exemplo n.º 30
0
 public Task <Participant> GetAsync(ConferenceId conferenceId, UserId userId)
 => _participants
 .Include(x => x.Attendances)
 .SingleOrDefaultAsync(x => x.ConferenceId == conferenceId && x.UserId == userId);