Für das Mitglied [Klasse] gibt es keine unterstützte Übersetzung in SQL

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Für das Mitglied [Klasse] gibt es keine unterstützte Übersetzung in SQL

by Anonymous » 02 Jan 2025, 00:57

Ich erhalte die folgende Fehlermeldung:

Code: Select all

Error Message:The member 'Company.ProductCore.Core.Domain.Account.Email' has no supported translation to SQL.
Meine Methode sieht so aus:

Code: Select all

public Account GetAccountByEmail(string email)
{
Account account;

using (WorkbookDataContext dc = _conn.GetContext())
{
account = (from a in dc.Accounts
join em in dc.Emails on a.AccountId equals em.AccountId
where a.Email.EmailAddress == email
select a).FirstOrDefault();
}

return account;

}
Die Klasse 
Mein Konto verfügt über einen Getter/Setter, der E-Mail:
verfügbar macht

Code: Select all

 public Email Email
{
get { return _email; }
set { _email = value; }
}
Und meine E-Mail ist ein LINQ-Objekt.
Ich habe das Gefühl, dass das Problem darin besteht, dass ich ein LINQ-Objekt verwende me Email Eigenschaft? Ich bin neu bei LINQ und bin mir nicht wirklich sicher, warum das passiert.

Top