public ActionResult Get()
        {
            try
            {
                var tipoUser = _service.GetAll();
                if (tipoUser.Count == 0)
                {
                    return(NoContent());
                }

                return(Ok(tipoUser));
            }
            catch (ServiceException e)
            {
                return(StatusCode(500, e.Message));
            }
        }
Esempio n. 2
0
 // GET: Usuario/Create
 public ActionResult Create()
 {
     ViewBag.TiposUsuario = new SelectList(_tipoUsuarioService.GetAll(), "Id", "Descricao");
     ViewBag.Organizacoes = new SelectList(_organizacaoService.GetAll(), "Id", "RazaoSocial");
     return(View());
 }