Hi, I am getting error "For the EntityDataSource, either Type or DbType (but not both) must be specified for each Parameter."
If I type DbType="Guid" then I get another error "'DailyCollection' is not a member of type 'ASPNETDBModel.DailyCollection' in the currently loaded schemas. Near simple identifier, line 6, column 4."
Please tell me what is the issue?
I am using this code.
Code:
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=ASPNETDBEntities"
DefaultContainerName="ASPNETDBEntities" EnableDelete="True"
EnableFlattening="False" EnableInsert="True" EnableUpdate="True"
EntitySetName="Clients" oninserting="EntityDataSource1_Inserting"
EntityTypeFilter="" Select="" Where="it.DailyCollection.UserId=@userId">
<WhereParameters>
<asp:SessionParameter Name="userId" SessionField="UserID" DbType="Guid" />
</WhereParameters>
</asp:EntityDataSource>
And code behind's Page_Load is
Code:
protected void Page_Load(object sender, EventArgs e)
{
Session["UserID"] = Membership.GetUser().ProviderUserKey;
}