我不確定如何去這,WCF SQL插入GUID轉換錯誤
我想用WCF添加唯一標識符爲我的用戶,當我去一個GUID添加到我的客戶的DataContext它拋出這個錯誤
錯誤2
參數1:無法從 '的System.Guid' 轉換爲 'ServiceFairy.client' C:\用戶\約翰\文檔\ Visual Studio的 2010 \項目\ PremLeague \ ServiceFairy \ Service1.svc .cs
有什麼機會可以幫忙?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Data.SqlClient;
using System.Diagnostics;
namespace ServiceFairy
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in code, svc and config file together.
public class Service1 : IService1
{
public List<match> GetAllMatches()
{
matchtableDataContext context = new matchtableDataContext();
var matches = from m in context.matches orderby m.Date select m;
return matches.Take(100).ToList();
}
public List<premtable> GetTable()
{
premContext context = new premContext();
var table = from user in context.premtables orderby user.ID select user;
return table.Take(100).ToList();
}
public Dictionary<Guid, Uri> _clientUris = new Dictionary<Guid, Uri>();
public void Subscribe(Guid clientID, string uri)
{
ClientsDBDataContext context = new ClientsDBDataContext();
context.clients.Insert(clientID);
}
ServiceFairy? ... –
您的問題不清楚 –
您認爲這與WCF有什麼關係? –