无法调用应用程序中的服务

本文关键字:服务 应用程序 调用 | 更新日期: 2023-09-27 18:22:21

嗨,当我试图在我的应用程序中使用服务时,它抛出了一个错误错误12方法"Eiss.Core.Services.FlorPlanMethods.ErrorWrap(string,System.Func)"的类型参数无法从用法中推断出来。请尝试显式指定类型参数。E: ''Code''WebPlatform'' Branch''CodeFin''PPresentation''EISS''CoreServiceInterfaces '' FloorPlanMethods.cs 48 13 CoreServiceInterfaces

 [OperationContract]
    [FaultContract(typeof(EissError))]
    void ProcessCallHistoryRequestQueue();  

Bal

public static void ProcessCallHistoryRequestQueue()
    {            
        Aspect.Wrap("CallHistoryRequestQueue.ProcessCallHistoryRequestQueue", new AuditParameters(), () =>{
            // Get unprocessed Queue Item
            var queueItem = DAL.CallHistoryRequestQueue.FetchQueueItemForProcessing();
            Guid fileStoreGuid = Guid.Empty;

在dal

 public static STO.CallHistoryRequestQueue FetchQueueItemForProcessing()
    {
            return Aspect.WrapSingle("CallHistoryRequestQueue.FetchQueueItemForProcessing", new AuditParameters(), db => 
            db.CallHistoryRequestQueues.OrderByDescending(a=>a.CallHistoryRequestQueueID).SingleOrDefault(sto => sto.IsProcessed == false));
    }

应用中

 public static List<CallHistoryRequestQueue> ProcessCallHistoryRequestQueue()
    {
      return  ErrorWrap ("ProcessCallHistoryRequestQueue", s => s.ProcessCallHistoryRequestQueu()); error here
    }

无法调用应用程序中的服务

没有足够的细节来给出详细的解决方案,但该错误是在未指定类型的情况下调用泛型方法的结果。编译器通常可以为您计算出类型,但在这种情况下,它是不明确的,需要您告诉它。