public IActionResult Post([FromBody] GenreAddDTO genre)
 {
     try
     {
         addCommand.Execute(genre);
         return(StatusCode(201));
     } catch (EntityAlreadyExistsException e)
     {
         return(Conflict(new ErrorMessage {
             Message = e.Message
         }));
     }
 }
        public async Task <ResultDTO> AddNewGenre([FromBody] GenreAddDTO genre)
        {
            Genre newGenre = new Genre();

            newGenre.Name = genre.name;
            // newDeveloper.Id = _context.Developers.LastOrDefault().Id+1;


            await _context.Genres.AddAsync(newGenre);

            await _context.SaveChangesAsync();

            return(new ResultDTO
            {
                Status = 200,
                Message = "Item added"
            });
        }