Page 1 of 1

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

Posted: 02 Jan 2025, 00:57
by Anonymous
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.