views:

87

answers:

0

I have an existing .Net single tier web app that is built using declarative data binding in the markup using EntityDatasource objects. I am in the process of extracting out the layers (Business Logic, Data Access) from the UI and migrating this to a ntier app.

This app is using Declarative data binding. e.g.:

<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 an ntier environment or do you have to manually data bind to the business objects?

If you can use declarative data bind in the type of app, does anyone have some examples they could point me to where I can learn how to implement?

I figured I could perform LINQ queries from the BLL to populate the EntityDataSource but not sure if this is the way to go or not.

Do EntityDataSouce objects have a place in n-tier UI?