public int HandleCreate(GenreForm form)
        {
            Genre genre = genreFactory.Create(form.Name);

            entityRepository.InsertOnSave(genre);
            entityRepository.SaveChanges();

            return(genre.Id);
        }
        public void HandleEdit(int id, GenreForm form)
        {
            var genre = genreRepository.GetGenreById(id);

            if (genre == null)
            {
                return;
            }
            entityRepository.AttachOnSave(genre);

            genre.Name = form.Name;

            entityRepository.SaveChanges();
        }