Home

Can I use DbFunctions in Linqpad C# statement?

I tried to reference System.Data.Entity but LinqPad still says DbFunctions not defined in the context. Any idea?

Many thanks,

jiancheng

Comments

  • Not that you may have the same issue I did, but make sure that you don't have a "PlugIns" folder created which is housing an older version of the Entity Framework DLL.

    I found that the Plugins folder assemblies are preferred even over those which are added directly as references to your query or added with NuGet.
  • Thank you!
    I finally found I will have to call "System.Data.Entity.DbFunctions" instead of "DbFunctions", though LinqPad gives me a different error message as "This function can only be invoked from LINQ to Entities", which I found a workaround by Google search().
Sign In or Register to comment.