public Task <List <CxMeetingModel> > GetMeetings(CxUserModel user)
 {
     return(dbContext.Meetings
            .GetAsync(meeting => meeting.OwnerId == user.Id ||
                      meeting.Attendees.Any(a => a.UserId == user.Id))
            .ContinueWith(x => x.Result.Select(dbMeeting =>
                                               new CxMeetingModel(dbMeeting)).ToList()));
 }
 public async Task Create(CxUserModel user)
 {
     await DbContext.Users.AddAsync(new CxUser()
     {
         Id = "", Email = user.Email, Name = user.Name, IdentityId = user.IdentityId,
         CanCreateMeetings = user.CanCreateMeetings
     });
 }
Beispiel #3
0
        public MeetingDto(CxMeetingModel model, CxUserModel currentUser)
        {
            this.Id          = model.Id;
            this.Title       = model.Title;
            this.Description = model.Description;
            this.StartTime   = model.StartTime;
            this.Duration    = model.Duration;
            this.IsPublic    = model.IsPublic;
            this.IsArchived  = model.IsArchived;

            this.IsOwner             = model.OwnerId == currentUser.Id;
            this.IsAttendee          = model.Attendees.Any(a => a.UserId == currentUser.Id);
            this.IsAttendeeRequested = model.AttendeeRequests.Any(a => a.UserId == currentUser.Id);

            this.IsStarted = !string.IsNullOrEmpty(model.SessionId);
        }
Beispiel #4
0
 public UserDto(CxUserModel model)
 {
     this.Id   = model.Id;
     this.Name = model.Name;
     this.CanCreateMeetings = model.CanCreateMeetings;
 }