Exemple #1
0
        public async Task <ActionResult> AddGrade(int actorId, int movieId, int grade, string author)
        {
            GradeAddDto newGrade = new GradeAddDto()
            {
                ActorId    = actorId,
                MovieId    = movieId,
                GradeValue = grade,
                Author     = author
            };
            await _actorService.AddGrade(newGrade);

            return(RedirectToAction(nameof(Details), new { id = actorId }));
        }
 public async Task AddGrade(GradeAddDto grade)
 {
     await _gradeRepository.Add(_mapper.Map <Grade>(grade));
 }