Entity Framework - Cannot convert lambda expression to type 'string' because it is not a delegate type

后端 未结 15 2290
再見小時候
再見小時候 2020-11-30 09:18

I am using Entity Framework in my C# based code. I am running into an unexpected weirdness and am looking for suggestions.

Case 1, 2, 3, 4... Projects:
RivWorks

15条回答
  •  鱼传尺愫
    2020-11-30 10:14

    My issue involved the format:

    .Columns(columns => {
        columns.Bound(p => p.Id).Filterable(false);
        columns.Bound(p => p.Name).Width(250);
        ...
    

    Every p.Whatever had this error on it.

    This was a project using MVC, and I found my issue was having "public static int" or "public static string" on these variables (Id, Name, etc.) in my model. When I removed "static" on all my model variables, I no longer got the error. Was driving me nuts for about a day...

提交回复
热议问题