Exemplo n.º 1
0
        public ActionResult Create(Artist Entity)
        {
            if (ModelState.IsValid)
            {

                Entity.Date_Creation = DateTime.Now;
                Uow.ArtistRepository.Add(Entity);

                Uow.Commit();

                return RedirectToAction("Index");
            }
            return View(Entity);
        }
Exemplo n.º 2
0
        public ActionResult Edit(Artist EditEntity, int id, SEO POSTSEO, int SEOID = 0)
        {
            if (ModelState.IsValid)
            {
                var Entity = Uow.ArtistRepository.GetByID(id);

                UpdateModel(Entity);

                Uow.Commit();

                return RedirectToAction("Index");
            }

            return View(EditEntity);
        }