에서 존재하지 않는 날씬한 나는이 오류가 말끔에 대한 myfriends VAR에 발생하는 알려진 관리 공급자 기본 유형에 개체 형식의 매핑이 존재하지 않는 오류 를 얻을. 나는 테이블이 다음 다른 반대를 비교에서 INT 값의 목록을 가져 말끔를 사용하고 있습니다 ..이mvc3는 매핑이 나는 단정 한 몇 가지 코딩을하고있는 중이 모델
int myid = Convert.ToInt32(User.Identity.Name);
// The var myfriend is giving me that error above
var myfriends = sqlConnection.Query<friend>("Select otherfriendsID from friends where [email protected]", new { myidd = myid }).ToList();
var profiles = sqlConnection.Query<profile>("Select top 40 * from profiles where photo is not null AND [email protected] order by profileID desc", new {friendship=myfriends}).ToList();
그러나 나에게 그 오류를주는 코드 예를 아래에이 코드에 대한 좋은 내가 엔티티를 사용하는 경우 모든 작품입니다 여기에 갈 수 무엇
var myfriends = (from s in db.friends where s.profileID == myid select s.otherfriendsID).ToList();
..
myfriends는 VAR profileIds = myfriends.Select (X => X 많이 20~50명 감사의 목록에 대한 것입니다. ProfileId) 완벽하게 작동; 당신의 경험에 비추어 볼 때이 방식으로 사용 된 Dapper는 많은 레코드가있는 데이터베이스 테이블을 스캔해야한다는 점에서 Entity보다 빠르다고 생각합니까? – user1591668
@user는 사용 된 쿼리, 사용 된 라이브러리 및 사용 된 기술에 따라 다릅니다. 그러나 기본적으로 "예, 나는 그것이 가능한 한 빨리 될 것이라고 생각합니다" –