Exemple #1
0
 public ActionResult Delete(int id, IFormCollection collection)
 {
     try
     {
         var resultado = repositorioUsuario.Delete(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch (Exception e)
     {
         return(View());
     }
 }
Exemple #2
0
        public bool EliminarUsuario(DtoUsuario usr)
        {
            IRepositorioUsuario repo = new RepositorioUsuario();

            if (usr != null)
            {
                Usuario user = new Usuario
                {
                    Email    = usr.Email,
                    Password = usr.Password
                };
                return(repo.Delete(user));
            }
            return(false);
        }