entityframework.sqlserver.dll中发生了'system.notsupportedexception'类型的异常,但未在用户代码中处理 [英] An exception of type 'system.notsupportedexception' occurred in entityframework.sqlserver.dll but was not handled in user code

查看:344
本文介绍了entityframework.sqlserver.dll中发生了'system.notsupportedexception'类型的异常,但未在用户代码中处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好



我已经暂时获得此System.NotSupportedException异常,我用完了选项。当我尝试从浏览器访问findAllUsers()函数时出现此错误。



我有模型类:



Hi there

I have been getting this "System.NotSupportedException" exception for a while now, I ran out of options. I get this error when I try to access the findAllUsers() funtion from my browser.

I have model class:

Public Class pUsers

Public Property UserId() As Long
Public Property Username() As String
Public Property Password() As String
Public Property Email() As String
Public Property Cell() As String
Public Property DateCreated() As Date
Public Property LastLogin() As DateTime

End Class





ServiceAPIserver类有一个如下所示的函数:





The ServiceAPIserver class has a function that looks like this:

Public Function findAllUsers() As List(Of pUsers) Implements IServiceAPIServer.findAllUsers
    Using mde As New AllMyAPIEntities()
        Return mde.UserEntities.[Select](Function(ue) New pUsers() With {
            .UserId = ue.UserId,
            .Cell = wrapper.DecryptData(ue.Cell),
            .DateCreated = ue.DateCreated,
            .Email = wrapper.DecryptData(ue.Email),
            .LastLogin = ue.LastLogin,
            .Password = ue.Password,
            .Username = wrapper.DecryptData(ue.Username)}).ToList()
    End Using
End Function





我尝试过:



我真的不知道该怎么做,因为这是知道的唯一方法。



What I have tried:

I really have no idea what to do since this is the only way a know.

推荐答案

我删除了wrapper.DecryptData。来自另一个论坛的jmcilhinney提醒我,在运行时,基础提供商不支持某些事情。
I have removed the wrapper.DecryptData. jmcilhinney from another forum reminded me that at run time, certain things are not supported by the underlying provider.


这篇关于entityframework.sqlserver.dll中发生了'system.notsupportedexception'类型的异常,但未在用户代码中处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆