I have a wcf that returns me some information, I would like to bring them organized, how could I do this?
I would like to return data like this:
Atthemomentitislikethis:
I'm doing 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");
}
}