2
Good morning, I would like to receive a data model in a method of my webservice, what is the correct procedure for me to get ? 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:
Unable to serialize the member Application.Core.Domain.Farmacia.Training of the type System.Collections.Generic.Icollection`1[Application.Core.Domain.Farmaciatreineing, Application.Core, Version=1.0.0.0, Culture=neutral, Publickeytoken=null]] because it is an interface.