public IHttpActionResult Get(int id) { using (DataContext context = new DataContext()) { ProdutoService produtoService = new ProdutoService(context); var p = produtoService.BuscarPorCodigo(id); if (p != null) { return(Ok(p)); } else { return(NotFound()); } } }