我是 WCF 新手,不知道出了什么问题,我收到以下错误:
WcfServiceLibrary.ReportServiceCO' 没有实现接口成员'WcfServiceLibrary.IReport.GetAllOrdersForCustomer(int)'
界面:
[ServiceContract]
interface IReport
{
// [OperationContract]
// List<ModelData> GetAllCustomer();
[OperationContract]
List<ORDER> GetAllOrdersForCustomer(int _customerid);
}
班上:
class ReportServiceCO : IReport
{
public List<ORDER> GetAllORDERsForCustomer(int _customerid)
{
List<ORDER> orders = new List<ORDER>();
TestEntities ent = new TestEntities();
var orders3 = from x in ent.ORDERs
where x.CUSTOMERID == _customerid
select new { x.ORDERID, x.DATA, x.CUSTOMERID, x.VALOARE };
foreach (var i in orders3)
{
ORDER o = new ORDER();
o.ORDERID = i.ORDERID;
o.CUSTOMERID = i.ORDERID;
o.DATA = i.DATA;
o.CUSTOMERID = i.CUSTOMERID;
o.VALOARE = i.VALOARE;
orders.Add(o);
}
return orders;
}
}