내 엔티티 모델이 추가되었습니다 때 예 그러나엔티티 프레임 워크 다음 DB 쿼리
Call Date To From Phone Number
20/1/2010 00:00 23:59 08923233223
20/1/2010 00:00 23:59 08923233245
, 나는 기대로 데이터를 반환 내 데이터베이스에서 일부 데이터에 대한 뷰를 가지고 나는 단순히이 엔터티에 엔터티 데이터 소스를 바인딩하고
Call Date To From Phone Number
20/1/2010 00:00 23:59 08923233223
20/1/2010 00:00 23:59 08923233223
나타나는 중복 (예상치 못한) 데이터를 얻을 수 있지만 데이터가
다르게 반환되는 이유에 내 머리를 긁적 왼쪽하고 그것을 쿼리3210EDIT : 흥미롭게도 이것은 행 수가 예상대로 일치하기 때문에 후드 조인에서 이상한 결과가 될 수 없습니다. 나는 또한 함께 사람이 비슷한 문제를 경험 한
자신이 같은 이상한 결과
From o In App.Entities.v_PersonalRules Where o.companyid = CompanyID Select o
내가 비주얼 스튜디오 2010을 사용하고 함께 테스트 할 수있는 쿼리, .NET 4를 뒀다?
편집 : 캡처 (사용 프로파일)는 SQL 당신이해야
<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="EDS_Personal"
EnableModelValidation="True" AllowPaging="True" AllowSorting="True" CssClass="nice_table" PagerStyle-CssClass="cssPager" AutoGenerateDeleteButton="true" AutoGenerateEditButton="true" >
<Columns>
<asp:CommandField ButtonType ="Link" EditText="Edit" ShowEditButton="true" />
<asp:BoundField DataField="billdate" HeaderText="Bill Date" SortExpression="billdate" DataFormatString="{0:dd-MM-yyyy}" />
<asp:BoundField DataField="starttime" HeaderText="From" SortExpression="starttime" DataFormatString="{0:t}"/>
<asp:BoundField DataField="endtime" HeaderText="To" SortExpression="endtime" DataFormatString="{0:t}" />
<asp:BoundField DataField="description" HeaderText="Type" SortExpression="description" />
<asp:BoundField DataField="HSNumber" HeaderText="Calls From" SortExpression="HSNumber" />
<asp:BoundField DataField="uid" HeaderText="uid" SortExpression="uid" visible="true"/>
<asp:BoundField DataField="dialledNo" HeaderText="Calls To" SortExpression="dialledNo" />
<asp:BoundField DataField="companyid" HeaderText="Company ID" SortExpression="companyid" />
</Columns>
</asp:GridView>
감사합니다. 오늘 같은 문제에 직면하여 도움을 받았습니다. – franklins
나는 딘 (Dean)이 지적한 해결책에 게시 된 작품을 발견했다. – franklins