# ActionLogs

ID: 13BCECC5-8BDB-4C56-9B40-8D7F16179EFF
ModuleName: QueryableMethodTranslatingExpressionVisitor
ActionName: <VisitMethodCall>g__CheckTranslated|15_0
ITCode: admin
ActionUrl: /BasicData/DeviceVariable/Search
ActionTime: 2024-05-31 22:55:33.0733153
IP: ::1
Remark:
  System.InvalidOperationException: The LINQ expression 'DbSet<DeviceVariable>()
      .Where(d => d.DeviceId.Value == 59fa75bb-f044-4cb0-962e-a52d09935827)
      .LeftJoin(
          inner: DbSet<Device>(), 
          outerKeySelector: d => EF.Property<Guid?>(d, "DeviceId"), 
          innerKeySelector: d0 => EF.Property<Guid?>(d0, "ID"), 
          resultSelector: (o, i) => new TransparentIdentifier<DeviceVariable, Device>(
              Outer = o, 
              Inner = i
          ))
      .OrderBy(d => d.Outer.Index)
      .ThenBy(d => d.Inner.DeviceName)
      .ThenBy(d => d.Outer.Alias)
      .ThenBy(d => d.Outer.Method)
      .OrderBy(d => new DeviceVariable_View{ 
          ID = d.Outer.ID, 
          DeviceId = d.Outer.DeviceId, 
          Name = d.Outer.Name, 
          Index = d.Outer.Index, 
          Description = d.Outer.Description, 
          Method = d.Outer.Method, 
          DeviceAddress = d.Outer.DeviceAddress, 
          DataType = d.Outer.DataType, 
          IsTrigger = d.Outer.IsTrigger, 
          EndianType = d.Outer.EndianType, 
          Expressions = d.Outer.Expressions, 
          IsUpload = d.Outer.IsUpload, 
          ProtectType = d.Outer.ProtectType, 
          DeviceName_view = d.Inner.DeviceName, 
          Alias = d.Outer.Alias, 
          Device = d.Inner 
      }
      .Message)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
     at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|15_0(ShapedQueryExpression translated, <>c__DisplayClass15_0& )
     at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
     at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVi


