I have 2 tables, Clients and ClientInterests. The PK/FK being ClientID of type GUID
This is my Linq, where I want to insert into the ClientIneterests table
ClientInterestRegistration clientRegisteration = new ClientInterestRegistration
{
ClientID = (from v in DB.Clients
where v.Email.Equals(EmailAddress)
select new {v.ClientID}).Single(),
ClientInterest = SelectedInterests,
..
};
Error received is:
Cannot implicitly convert type System.Linq.IQueryable<AnonymousType#1>
to System.Guid