.Net Declarative Data Binding in nTier

I have an existing .NET sibling web application that is built using declarative data binding in markup using EntityDatasource objects. I am going to extract the layers (Business Logic, Data Access) from the UI and transfer it to the ntier app.

This application uses declarative data binding. eg:.

<asp:DropDownList ID="ddUsers" runat="server" 
    DataSourceID="edsUsers_DET" DataTextField="UserName" 
    DataValueField="UserID" ondatabound="ddUsers_DataBound">
</asp:DropDownList>

    <asp:EntityDataSource ID="edsUsers" runat="server" 
        ConnectionString="name=MyEntities" DefaultContainerName="MyEntities" 
        EntitySetName="Users" Include="Roles"
        Where="it.Roles.UserID = @UserID" 
        OrderBy="it.ModifyDate DESC">
    <WhereParameters>
         <asp:Parameter Name="UserID" Type="Int32" />
    </WhereParameters>
    </asp:EntityDataSource>

      

Is declarative data binding used in ntier framework or do you need to manually bind data to business objects?

If you can use declarative data binding in an application type, does anyone have some examples they could point me to where I can find out how to implement?

I figured I can execute LINQ queries from the BLL to populate the EntityDataSource, but I'm not sure if that's the way to go or not.

Do EntityDataSouce objects have room in n-tier UI?

+2


source to share





All Articles