Beispiel #1
0
 private QuestionDetail AddQuestionDetailToContext(ApplicationUser currentUser, ApplicationUser askedToUser, Question question)
 {
     var questionDetail = new QuestionDetail()
     {
         Answered = false,
         AskedBy = currentUser,
         AskedTo = askedToUser,
         Question = question,
         SeenByUser = false,
         Active = true,
         TimeStamp = question.TimeStamp
     };
     _context.QuestionDetails.Add(questionDetail);
     return questionDetail;
 }
 private ActionResult GetQuestionAskedNotificationPartialView(QuestionDetail questionDetail, bool seen)
 {
     var model = GetQuestionAskedNotificationModel(questionDetail, seen);
     return PartialView("QuestionNotification", model);
 }
 private QuestionAskedNotificationViewModel GetQuestionAskedNotificationModel(QuestionDetail questionDetail, bool seen)
 {
     var model = new QuestionAskedNotificationViewModel(questionDetail, seen)
     {
         AskedUser = GetProfileFor(questionDetail.AskedTo),
         AskingUser = GetProfileFor(questionDetail.AskedBy),
         TimeStamp = questionDetail.TimeStamp,
         QuestionDetailId = questionDetail.QuestionDetailId
     };
     return model;
 }