This project has moved and is read-only. For the latest updates, please go here.

CS0121 SingleOrDefaultAsync when using EF and LinqToTwitter

Sep 28, 2016 at 1:10 PM

i'm using entity framework as well as linqtotwitter in my controller, i'm getting the following error

Error CS0121 The call is ambiguous between the following methods or properties: 'System.Data.Entity.QueryableExtensions.SingleOrDefaultAsync<TSource>(System.Linq.IQueryable<TSource>)' and 'LinqToTwitter.TwitterExtensions.SingleOrDefaultAsync<T>(System.Linq.IQueryable<T>)'

Code is the simple example stated on this site:

var searchResponse =
            (from search in twitterCtx.Search
             where search.Type == SearchType.Search &&
                   search.Query == "\"Pizza\""
             select search)

Anyone a suggestion how to fix this?

kind regards