예제 #1
0
        public ActionResult Create(GeneroViewModel generoViewModel)
        {
            if (ModelState.IsValid)
            {
                var genero = Mapper.Map <Genero>(generoViewModel);
                generoService.Add(genero);

                return(RedirectToAction("Index"));
            }

            return(View(generoViewModel));
        }
예제 #2
0
 public void Add(Genero Genero)
 {
     _generoService.Add(Genero);
 }