Good morning, I would like to receive a data model in a method from my webservice, what is the correct procedure for me to get it? I'm trying the code below but it's not working.
namespace UI.Web
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Services : System.Web.Services.WebService
{
private string ChaveSeguranca = "";
private BancoContexto contexto;
public Services()
{
contexto = new BancoContexto();
}
[WebMethod]
public string ControleUsuario(Farmacia Farma)
{
return "Ok";
}
}
}
Error:
Can not serialize member Application.Core.Dominio.Farmacia.Treinamentos of the type System.Collections.Generic.ICollection'1 [[Application.Core.Domain.Farmacy.Training, Aplicacao.Core, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null]] because it is an interface.