silverlight服务reference.cs

时间:2013-05-18 08:18:57

标签: wcf silverlight-5.0

我很高兴使用WCF进行Silverlight,有人可以帮助我。这让我很生气!!

我在service1.cs中的代码是:

[OperationContract]
    public List<PublishedSoftwareItem> GetSoftwareByArea(int ID)
    {
        ProductionFileManager manager = new ProductionFileManager();
        using (LinqToSQLPublishedSoftwareDataContext con = new LinqToSQLPublishedSoftwareDataContext())
        {
            var listOfSoftware = new List<PublishedSoftwareItem>();
            var getSoftware = from a in con.PublishedSoftwares
                              join b in con.Areas on a.AreaID equals b.AreaID
                              join c in con.ImageDataStores on a.ImageStoreID equals c.ID
                              select new PublishedSoftwareItem
                              {
                                  Description = a.SoftwareDescription,
                                  PublishLink = a.PublishLink,
                                  Title = a.SoftwareName,
                                  SoftwareImage = manager.GetImageFromDatabase(ID)

                              };
            listOfSoftware = getSoftware.ToList();

            return listOfSoftware;
        }

    }

当我更新我的reference.cs搞砸了,服务不再正常工作。我取消选中重用类型复选框,但没有帮助。请有人帮忙。询问您是否需要更多信息

1 个答案:

答案 0 :(得分:0)

你应该重新审视这个链接:

WCF Service ReferenceGet Use