public ActionResult Delete([FromBody] UsuarioSeletor seletor) { try { _service.Delete(seletor); return(Ok()); } catch (Exception ex) { return(BadRequest(ex)); } }
public ActionResult List([FromBody] UsuarioSeletor seletor) { try { if (seletor == null) { throw new Exception("Filtro inválido"); } return(Ok(new ResponseViewModel { Data = _service.GetList(seletor), Count = _service.Count(seletor) })); } catch (Exception ex) { return(BadRequest(ex)); } }