2017-09-05 14 views
0

它可能是重複的,我也看過有關此問題的其他問題。AutoMapper .ProjectTo <T>()正在導致一些問題

我在我的代碼中收到此錯誤消息 「LINQ to Entities does not recognized the method'System.String ToString()'method,this method can not be translated into a store expression。」

我覺得像.ProjectTo是導致一些問題,或者我錯過了什麼?我不寫了我們整個BL(業務邏輯),他們正在使用AutoMapper 4.2.1

enter image description here

這裏是從執行塊 enter image description here

源代碼,如果我做一個簡單的查詢,而不那些ApplyFilters ~~等

var query = (from dj in context.DJUsers select dj).ToList(); 

enter image description here

+0

用沒有AM的DateTime.ToString()嘗試一個EF查詢。 –

回答

0

嘗試升級EF。見this問題。