I wrote a defining query
<EntitySet Name="EntityFramework" EntityType="SEOAnalysisModel.Store.EntityFramework">
<DefiningQuery>
SELECT Keyword, ResultHead ,Year from SeoAnalysis where Year = 2005
</DefiningQuery>
</EntitySet>
And entity type for custom entity
<EntityType Name="EntityFramework">
<Key>
<PropertyRef Name="Year" />
</Key>
<Property Name="Year" Nullable="false" Type="int" />
<Property Name="Keyword" Nullable="false" MaxLength="1000" Type="varchar" />
<Property Name="ResultHead" Nullable="false" MaxLength="2000" Type="varchar" />
</EntityType>
But when I call a stored procedure, it returns only 1 value of the column
// Stored procedure
public void SelectValue() {
using (MyConnection ctx = new MyConnection()) {
foreach (var p in ctx.EntityFramework(2005)) {
Response.Write(p.Keyword);
}
}
}
And this column value is repetitive.
Now how can I get all column value?
Actually I am getting same keyword repetitive.
If I have keyword like Apple, then this keyword is repeating until loop is running.