Пример #1
0
        protected void btnSaveGenre_Click(object sender, EventArgs e)
        {
            GenreRepository rl = new GenreRepository();
            GenreTable      l  = new GenreTable();

            l.GenreName = txtGenre.Text;
            rl.AddGenre(l);
        }
        protected void ButtonSave_Click(object sender, EventArgs e)
        {
            Genre newGenre = new Genre();

            newGenre.GenreName = GenreName.Value;

            GenreRepository.AddGenre(newGenre);

            Response.Redirect("ListOfGenres.aspx");
        }
 public ActionResult Add(Genre genre)
 {
     _genreRepository.AddGenre(genre);
     return(Ok());
 }