I am testing the WCF facility with the AdventureWorks SQL Server database (The table name Person
).
When testing it in the wcftestclient.exe
, it gives red icon and says:
This Operation is not supported in the WCF test client because it uses type AdventureWorksDbWcf.Person
This is the service.svc.cs service class.
namespace AdventureWorksDbWcf
{
public class Service : IService
{
AW_DataClassesDataContext db = new AW_DataClassesDataContext();
public Person GetOnePerson(int BusinessEntityID)
{
var _person = from one in db.Persons
select one;
Person onlyOnly;
return onlyOnly = _person.First<Person>();
}
public List<Person> ListOfPeople()
{
var _person = from one in db.Persons
select one;
List<Person> list = _person.ToList();
return list;
}
}
}
Update: this is the IService
[ServiceContract] public interface IService { [OperationContract] Person GetOnePerson(int BusinessEntityID);
[OperationContract]
List<Person> ListOfPeople();
}
Have I missed something?
Please advise me.
thanks,
AdventureWorksDbWcf.Person
look like?? – marc_s