System.ExecutionEngineException was unhandled from wcf サービスを取得しています。
これが私のIservice.csのコードです
namespace MyService
{
[ServiceContract]
public interface IService1
{
[OperationContract]
List<MyEmployee> FindEmployee(string uid);
}
}
以下の Service1.svc.cs のコード
namespace MyService
{
public class Service1 : IService1
{
public List<MyEmployee> FindEmployee(string uid)
{
DataClasses2DataContext context = new DataClasses2DataContext();
var res = from r in context.MyEmployees where r.EmpId == uid select r;
return res.ToList();
}
}
}
リストを文字列に変更し、行全体ではなく 1 つの列を選択すると、このコードは正常に機能します。
前もって感謝します。