我使用Sql Server压缩数据库,我的linq查询在调试模式下正常工作,但在发布模式下有错误! 我的查询使用“join”,例外是:
方法' [My_Project_Namespace.MyTransactions,My_Project_Namespace.Users]。 '不是属性访问者
这是我的LINQ查询:
var result = from transRow in db.MyTransactions
join userRow in db.Users on transRow.User_id equals userRow.Id
join clientRow in db.Clients on
transRow.Client_id equals clientRow.Id
select new
{
userId = transRow.User_id,
clientId = transRow.Client_id,
userName = userRow.Fname + " " + userRow.Lname,
clientName = clientRow.Fname + " " + clientRow.Lname,
reg_date = transRow.Reg_date,
value = transRow.Value
};
我的目标是用他的名字添加(或替换)用户ID,并用他的名字添加客户端ID。
答案 0 :(得分:2)
Oleksiy Gapotchenko (Eazfuscator.NET Developer)说here
你需要在程序集级别添加它:
[assembly: Obfuscation(Feature = "anonymous type properties renaming", Exclude = true)]
然后,所有的匿名方法和类型都不会被混淆,并且(可能)会起作用....
答案 1 :(得分:0)
我发现这是因为使用了一些像“Eazfuscator.NET”这样的混淆器。 但它可以与其他一些混淆器一起工作,比如“Babel”!