Exemplo n.º 1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            _rolRepository.Delete(id);
            await _unitOfWork.SaveAsync();

            return(RedirectToAction(nameof(Index)));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Delete(int id)
        {
            var response = await repository.Delete(id);

            if (!response)
            {
                return(NotFound());
            }
            return(Ok());
        }
Exemplo n.º 3
0
 public void Delete(int idRol)
 {
     try
     {
         repository.Delete(idRol);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 public HttpResponseMessage DeleteRol(int id)
 {
     try
     {
         var result = _rolRepository.Delete(id);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex.Message.ToString()));
     }
 }
Exemplo n.º 5
0
        public ActionResult <Rol> DeleteRol(int id)
        {
            var rol = _rolRepository.GetById(id);

            if (rol == null)
            {
                return(NotFound());
            }

            _rolRepository.Delete(rol);
            return(rol);
        }
Exemplo n.º 6
0
 public bool Delete(int id)
 {
     return(rolRepository.Delete(id));
 }
Exemplo n.º 7
0
 public async Task Delete(int id, int firmaid)
 {
     await _rolRepository.Delete(id, firmaid);
 }
Exemplo n.º 8
0
 public Rol Delete(Rol item)
 {
     return(_RolRepository.Delete(item));
 }
Exemplo n.º 9
0
 void Eliminar(long idRol)
 {
     _RolRepository.Delete <Sg07_Rol>(idRol);
     _RolRepository.Save();
 }