public async Task <IActionResult> Contacts(AddFeedBackInputModel model) { var userId = this.User.FindFirst(ClaimTypes.NameIdentifier).Value; await this.feedBackService.AddAsync(model, userId); return(this.RedirectToAction("Contacts", new { success = "true" })); }
public async Task AddAsync(AddFeedBackInputModel model, string userId) { var feedBack = new FeedBack { About = model.About, Text = model.Text, UserId = userId, }; await this.feedBackRepository.AddAsync(feedBack); await this.feedBackRepository.SaveChangesAsync(); }