Transformation error when running a linq query
Transformation error when running a linq query
I placed a breakpoint after defining a linq query. When the breakpoint is hit and try to run the query, I get this error. Why am I getting an error if the code runs fine in Visual Studio?
Message: Transformation error:
Can't resolve member reference: xxx
Expression:
xxxx
Message: Transformation error:
Can't resolve member reference: xxx
Expression:
xxxx
Re: Transformation error when running a linq query
Please specify the following information:
- whether you are working with Visual Basic or C#;
- the full stack trace of the exception.
If it is a Visual Basic, then there is a known issue and it is related to the third-party libraries. We will inform you about the results as soon as any are available.
- whether you are working with Visual Basic or C#;
- the full stack trace of the exception.
If it is a Visual Basic, then there is a known issue and it is related to the third-party libraries. We will inform you about the results as soon as any are available.
Re: Transformation error when running a linq query
It's C#
Message: Transformation error:
Can't resolve member reference: this._lsrRepository.Table
Expression:
from l in this._lsrRepository.Table
where l.ResourceName == resourceKey && l.LanguageId == languageId
select l.ResourceValue
Type: System.InvalidOperationException
Source: Devart.LinqInsight.Core
Site: #=qBzue6vynCzaI2letsnlaFA==
Stack Trace:
at #=qoMjb6ajp3NYxkFWDFAA8hHAzcp_jAxEFBZ21No$urEb4inIhoQZY_pqDhkUUF0FjtjYE6siMsREyKYiRU8RKSZkX4Ld5qRvtr4d3KZrMRl0=.#=qBzue6vynCzaI2letsnlaFA==(KnownLanguages #=q6zmwDpH3n25yMlT5WlrJKg==, SyntaxTree #=q7ebfcwjJMp0w0czl9m3jnQ==, AstNode #=qiwFcjQiQKC6D_PWIuj56vg==, TypeSystem #=qCAs15OliQtBpyqec3sX8lA==)
at #=qoMjb6ajp3NYxkFWDFAA8hHAzcp_jAxEFBZ21No$urEb4inIhoQZY_pqDhkUUF0FjtjYE6siMsREyKYiRU8RKSZkX4Ld5qRvtr4d3KZrMRl0=.#=qEKuC6BxrOT9Oi2uTn9T4lw==(IDebuggerIntegration #=qVjXa5k$reWzVkW8Va625Rw==, KnownLanguages #=qCAiUbqIsqjR$wchx6HCAyw==, SyntaxTree #=qM0bSDRDSKIcLCtji5S8vBA==, AstNode #=qzDiR56jbMDdju1lCKN8fLg==, TypeSystem #=qB6Tho2BMKRHcwwKur_Aegw==, Dictionary`2 #=qToPMGn_maPwJEkZKZBqW9Q==, List`1& #=qgbG1tLknC7D2$eQ6JI7fWg==, List`1& #=qJygwsETVpayZ1Id$tM_E7Q==)
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=qThGB7jGYaaz40JHLtoZQ6w==()
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=q9q2_vW5kYFf5kWDuTazhtA==()
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=q47qZotjDBVEaA9fQ_2l37PFCo1nABP8kVCKfarSfJ8M=.#=qUSprfuJEXkd4mp24LOMiMd_O00_Rt$a99rS_qxXKak8=()
Message: Transformation error:
Can't resolve member reference: this._lsrRepository.Table
Expression:
from l in this._lsrRepository.Table
where l.ResourceName == resourceKey && l.LanguageId == languageId
select l.ResourceValue
Type: System.InvalidOperationException
Source: Devart.LinqInsight.Core
Site: #=qBzue6vynCzaI2letsnlaFA==
Stack Trace:
at #=qoMjb6ajp3NYxkFWDFAA8hHAzcp_jAxEFBZ21No$urEb4inIhoQZY_pqDhkUUF0FjtjYE6siMsREyKYiRU8RKSZkX4Ld5qRvtr4d3KZrMRl0=.#=qBzue6vynCzaI2letsnlaFA==(KnownLanguages #=q6zmwDpH3n25yMlT5WlrJKg==, SyntaxTree #=q7ebfcwjJMp0w0czl9m3jnQ==, AstNode #=qiwFcjQiQKC6D_PWIuj56vg==, TypeSystem #=qCAs15OliQtBpyqec3sX8lA==)
at #=qoMjb6ajp3NYxkFWDFAA8hHAzcp_jAxEFBZ21No$urEb4inIhoQZY_pqDhkUUF0FjtjYE6siMsREyKYiRU8RKSZkX4Ld5qRvtr4d3KZrMRl0=.#=qEKuC6BxrOT9Oi2uTn9T4lw==(IDebuggerIntegration #=qVjXa5k$reWzVkW8Va625Rw==, KnownLanguages #=qCAiUbqIsqjR$wchx6HCAyw==, SyntaxTree #=qM0bSDRDSKIcLCtji5S8vBA==, AstNode #=qzDiR56jbMDdju1lCKN8fLg==, TypeSystem #=qB6Tho2BMKRHcwwKur_Aegw==, Dictionary`2 #=qToPMGn_maPwJEkZKZBqW9Q==, List`1& #=qgbG1tLknC7D2$eQ6JI7fWg==, List`1& #=qJygwsETVpayZ1Id$tM_E7Q==)
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=qThGB7jGYaaz40JHLtoZQ6w==()
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=q9q2_vW5kYFf5kWDuTazhtA==()
at #=qVzpyih0YaJa$34sYGmRM4owZZ4PbPD41r6rGC969zqiQ3$X3viT_vucuiUUy7LR6wMR_vTgg9qRuSAvECbk58w==.#=q47qZotjDBVEaA9fQ_2l37PFCo1nABP8kVCKfarSfJ8M=.#=qUSprfuJEXkd4mp24LOMiMd_O00_Rt$a99rS_qxXKak8=()
Re: Transformation error when running a linq query
Please specify the definition of the "_lsrRepository".
Generally, LINQ Insight does not work with the class fields and properties, which are not static and are not of scalar types (int, string,etc.).
For example:
The following LINQ query produces the Transformation error:
The following LINQ query returns the correct results:
Generally, LINQ Insight does not work with the class fields and properties, which are not static and are not of scalar types (int, string,etc.).
For example:
Code: Select all
TestDataContext _dt; // TestDataContext is a class generated by Entity Developer tool using LinqConnect template
IQueryable<User> _users; // User is a class related to the TestDataContext class
int _count = 0;
Code: Select all
var c = from l in this._users
where l.Id == 1
select l.StatusB;
Code: Select all
var c = from l in this._dt.Users
where l.Id == this._count
select l.StatusB;
Re: Transformation error when running a linq query
It's IRepository<LocaleStringResource>. it's from an open source project called nopCommerce.
Re: Transformation error when running a linq query
If the information and query samples mentioned above didn't help to resolve the issue, please send us a small test project, with which the issue could be reproduced, so that we are able to investigate it in more detailes and find the solution for you.
Re: Transformation error when running a linq query
This is code written by someone else in an open source project. I am not planning to change code to make your profiler work. If you're interested to test it, you can download that project from codeplex and do your tests.MariiaI wrote:If the information and query samples mentioned above didn't help to resolve the issue, please send us a small test project, with which the issue could be reproduced, so that we are able to investigate it in more detailes and find the solution for you.
Re: Transformation error when running a linq query
We will investigate this behaviour with LINQ Insight and the nopCommerce project and inform you about the results as soon as any are available.
Re: Transformation error when running a linq query
We have made tests with the nopCommerce project and this is the expected behaviour. As we have said earlier, LINQ Insight couldn't resolve class fields and properties, which are not static and are not of scalar types. We are sending you a small test project to the e-mail address you have provided in your forum profile, which demonstrates a possible workaround.
Please check that the letter is not blocked by your mail filter.
Please check that the letter is not blocked by your mail filter.
Re: Transformation error when running a linq query
I am having a similar issue. Can you send to me a sample with the workaround?
Re: Transformation error when running a linq query
We are sending you a small test project to the e-mail address you have provided in your forum profile, which demonstrates a possible workaround.
Please check that the letter is not blocked by your mail filter.
Please check that the letter is not blocked by your mail filter.
Re: Transformation error when running a linq query
Can I get the sample code as well? I would like to make this work in my own nopCommerce project.
Re: Transformation error when running a linq query
We have contacted you by e-mail.