LINQ to Entities does not recognize the method 'System.String StringConvert(System.Nullable`1[System.Double])

后端 未结 2 647
谎友^
谎友^ 2020-12-10 03:21

I can\'t figure out why I\'m getting this error. I have used this function successfully with previous versions of Entity Framework but I\'ve set up a new project using EF6 a

相关标签:
2条回答
  • 2020-12-10 03:30

    I had the same problem and realized that I was using the wrong type of SqlFunctions. Make sure that you referenced the correct namespace:

    using System.Data.Entity.SqlServer;
    

    and not:

    using System.Data.Objects.SqlClient;
    
    0 讨论(0)
  • 2020-12-10 03:49

    You don't have to convert it to string, string concatenation will take care of that.

    AnncTitle = n.AnncTitle + " <a href='bulletinAdd.aspx?ID=" + n.RecID + "'><Edit></a>",
    

    You don't have to call ToString as well.

    0 讨论(0)
提交回复
热议问题