希望有人知道如何使用我的 linq-to-sql 数据上下文中的类型作为我的 web.config 提供程序属性中的类型属性。
<profile enabled="true">
<properties>
<add name="UserSetting" allowAnonymous="true" type="MyApp.DataAccess.UserSetting" />
</properties>
</profile>
因此,在这种情况下,UserSetting 是我数据库中的一个表,我使用 Linq 映射到 Sql。或者,在过去,我指定了一个我在我的应用程序中明确编写的类,它运行良好。我宁愿让它动态链接。
希望这是有道理的-谢谢!