I recently migrated an existing project to .net 4.5 and changed out what this project was using for data access (switching to Entity Framework).
For some reason any
The assembly for Queryable (the thing that adds the FirstOrDefault extension method you are using) is in System.Core, however it's namespace is System.Linq, you can see this on the MSDN page for it
Namespace: System.Linq
Assembly: System.Core (in System.Core.dll)
You need to have in your project a refrence to System.Core and in the file you are trying to use it a using System.Linq;
If you have both of these things double check that your project or some project you are refrencing did not create it's own System.Data.Entity.DbSet class which does not implement IQueryable or IEnumerable.