Exemplo n.º 1
0
        public void CreateRateSession(Rate rating)
        {
            EventAttendee et = _dbContext.EventAttendees.Where(e => e.Event_ID == rating.EventID && e.Person_ID == rating.UserID).FirstOrDefault();
            EventAttendeeRating ert = new EventAttendeeRating();
            ert.Comments = rating.Comments;
            ert.EventAttendee_ID = et.ID;
            ert.ReferralSource = rating.ReferralSource;
            ert.Refreshments = rating.RateFood;
            ert.SignIn = rating.RateSignin;
            ert.Swag = rating.RateSwag;
            _dbContext.EventAttendeeRatings.Add(ert);
            _dbContext.SaveChanges();
            foreach (RateSession rateSession in rating.RatedSessions)
            {
                EventAttendeeSessionRating erst = new EventAttendeeSessionRating();
                erst.EventAttendee_ID = et.ID;
                erst.Ranking = rateSession.Rating;
                erst.Session_ID = rateSession.SessionID;
                erst.Timeslot_ID = rateSession.TimeSlotID;
                erst.Comments = rateSession.Comments;

                _dbContext.EventAttendeeSessionRatings.Add(erst);
            }
            _dbContext.SaveChanges();
        }
Exemplo n.º 2
0
 public void CreateRateSession(Rate rating)
 {
     _sessionRepository.Value.CreateRateSession(rating);
 }
Exemplo n.º 3
0
 public void CreateRateSession(Rate rating)
 {
     _sessionRepository.Value.CreateRateSession(rating);
 }