Hi guys, I'm trying to pass a DTO with one navidation property IEnumerable<> inside of it, when I pass an object without child lists it works well, but, when I'm passing objects with childs and grandchilds the WCF services does not respond and gives me no error. I have to make something to work with this type of object specificly?
Here's my data contract
[ServiceContract]
public interface IProdutoService
{
[OperationContract]
CategoriaResponse GetCategoria(CategoriaRequest request);
[OperationContract]
ProdutoResponse GetProduto(ProdutoRequest request);
[OperationContract]
CategoriaResponse ManageCategoria(CategoriaRequest request);
[OperationContract]
ProdutoResponse ManageProduto(ProdutoRequest request);
}
//and then my DTO Class
public class ProdutoDto
{
#region Primitive Properties
[DataMember]
public Int32 Codigo { get; set; }
[DataMember]
public Int32 CodigoCategoria { get; set; }
[DataMember]
public String Descricao { get; set; }
[DataMember]
public Decimal? Preco { get; set; }
#endregion
#region Navigation Properties
[DataMember]
public CategoriaDto Categoria { get; set; }
[DataMember]
public VendaDto[] Vendas { get; set; }
#endregion
}
// And my service configuration looks like this:
<services>
<service behaviorConfiguration="behaviorAction" name="Uniarchitecture.ProdutoService.ServiceImplementations.ProdutoService">
<endpoint binding="wsHttpBinding" bindingConfiguration="bindingAction" contract="Uniarchitecture.ProdutoService.ServiceContracts.IProdutoService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="behaviorAction">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="bindingAction" transactionFlow="false" receiveTimeout="00:30:00" >
<reliableSession enabled="true"/>
</binding>
</wsHttpBinding>
</bindings>