Error CS1061 'Task>' does not contain a definition for 'FirstOrDefault' and no extension method 'FirstOrDefault' accepting a first argument of type 'Task>' could be found (are you missing a using directive or an assembly reference?) ,
making a web application with facebook controller, included using system.linq but still getting the error for FirstOrDefault()
.
I dont know what the problem is, i reinstalled visual studio too as he same thing works for my friends laptop.
I juggled around to see if the method is present in the library and it is there but still not getting past this Image for the same
public async Task<ActionResult> Posts()
{
var currentClaims = UserManager.GetClaimsAsync(HttpContext.Identity.GetUserId());
// Error occurs here at FirstOrDefault
var accesstoken = currentClaims.FirstOrDefault(x = > x.Type == "urn:tokens:facebook");
if (accesstoken == null)
...
}