5
I have a wcf that returns me some information, I would like to bring them organized, how could I do it?
I’d like to return data like this:
At the moment it’s like this:
I’m doing like this:
public List<V_PRODUTOS> GetProdutos(string credencial)
{
if (credencial != ChaveCredencial)
{
throw new Exception("Erro: Usuário não autorizado");
}
try{
using(SERRESTEEntities entites = new SERRESTEEntities())
return entites.V_PRODUTOS.ToList();
}
catch
{
throw new FaultException("Something went wrong");
}
}
You are using Json.net?
– Leonel Sanches da Silva