我是新來的WCF,不知道什麼是錯的,我得到以下錯誤:WCF接口沒有實現
WcfServiceLibrary.ReportServiceCO' does not implement interface member '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;
}
}
沒有看到它!謝謝! – 2013-03-28 11:09:16