i use asp.net 4 and EF.
I have a EntityDataSource and I would like select only the TOP 10 records from my DataBase, Example SELECT TOP(10).
Here my code, how can I do it? Thanks
<asp:EntityDataSource ID="uxEntityDataSourceEndingSponsoredContents" runat="server"
ConnectionString="name=CmsConnectionStringEntityDataModel"
DefaultContainerName="CmsConnectionStringEntityDataModel" EntitySetName="CmsSponsoredContents"
OrderBy="it.EffectiveEndDate ASC" EnableFlattening="False" CommandText=""
EntityTypeFilter="">
</asp:EntityDataSource>
You have to use top(n)