0

I need ideas of how can I substitute the DataPortal model, so I dont use any portals, instead of that I want return object, table or DataSet and to attach any of these to the report on my website.

    public static CustomizeCourseCompletionWithModuleList GetCustomizeCourseCompletionWithModuleList()
    {
        var cmd = new StoredProcedure
        {
            CommandText = "CustomizeCourseCompletionWithModuleSelectById",
            CommandType = System.Data.CommandType.StoredProcedure
        };
        cmd.Parameters.Add("@ID", DBNull.Value);
        return DataPortal.Fetch<CustomizeCourseCompletionWithModuleList>(cmd);
    }
4

1 回答 1

1

你正在与框架作斗争,这不会很好地结束。当您在 csla 上构建应用程序时,您应该返回 csla 业务对象,并且您的用户界面不应该看到诸如数据表之类的东西。这些是您的 csla 对象可以用来加载自己的数据访问技术,但应该是您的业务层不公开的实现细节。

于 2013-10-02T02:22:07.107 回答