Code: Select all
Error Message:The member 'Company.ProductCore.Core.Domain.Account.Email' has no supported translation to SQL.
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
verfügbar macht
Code: Select all
public Email Email
{
get { return _email; }
set { _email = value; }
}
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.