를 반환하는 특정 값을 선택하여 나 자신 나는 LINQ 쿼리에 SQL 쿼리를 변환 만
var queryTest = context.db_accounts_last_contacts.SqlQuery(@"SELECT follow_up_date, MAX(last_contact_date) AS last_contact_date
FROM db_accounts_last_contacts p
GROUP BY p.account_id");
을 시도
SELECT follow_up_date, MAX(last_contact_date) AS last_contact_date
FROM db_accounts_last_contacts p
GROUP BY p.account_id
SQL 쿼리가 있지만 나는이 오류가 발생합니다.
The data reader is incompatible with the specified 'dbModel.db_accounts_last_contacts'. A member of the type, 'id', does not have a corresponding column in the data reader with the same name.
난, 난 그냥 당신이 액세스하려는 생각이 두 개의 열
해당 SQL 쿼리가 작동합니까? group by 절에서 follow_up_date를 집계 함수에 없으므로 필요가 없습니까? – juharr