public async Task <FeedbackLeanerMeetingDTO> AddFeedback(FeedbackLeanerMeetingDTO _FeedbackLernerMeetingDTO)
        {
            var LearnerMeeting = _context.LearnerMeetings.Where(lm => lm.LearnerMeetingID == _FeedbackLernerMeetingDTO.LearnerMeetingID).FirstOrDefault();

            LearnerMeeting.FeedbackFromTeacher = _FeedbackLernerMeetingDTO.FeedbackDetails;
            await _context.SaveChangesAsync();

            return(new FeedbackLeanerMeetingDTO());
        }
Esempio n. 2
0
        public async Task <IActionResult> AddFeedbackLearnerMeeting([FromBody] FeedbackLeanerMeetingDTO _FeedbackLeanerMeetingDTO)
        {
            try
            {
                var feedbackLearnerMeetingDTO = await _learnerMeetingService.AddFeedback(_FeedbackLeanerMeetingDTO);

                return(Ok("Feedback Added"));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }