public HttpResponseMessage ListarPlanosdeConta() { try { var model = new List <PlanoContaViewModel>(); var result = _financeiroService.ListarPlanoContas(base.GetUsuarioLogado().IdClinica); if (result.Count > 0) { foreach (var item in result) { model.Add(new PlanoContaViewModel() { IdPlanoConta = item.IdPlanoConta, NmPlanoConta = item.NmPlanoConta, Tipo = item.Tipo, Situacao = item.Situacao }); } } return(Request.CreateResponse(HttpStatusCode.OK, model)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message)); } }