I have written a VS add in that is like a cheap knockoff of the BO mapper except it creates what I call a "QueryObject". Basically it generates an entity object based on the fields in a select statement. I did this to allow me to have design time support for reports for joined tables etc without having to create dummy table and monkey with getting a business binding source to work on an xtra report.
Option
Imports
Namespace
<Serializable()> _
Public Sub testreport()
Me.FillDataTable("Select cuname as [Customer] from Customer")
Dim rpt As New TestReport
rpt.DataSource = Me.CurrentDataTable
rpt.ShowPreview()
This scenario seems to work out well so far but then as usual I got to thinking about having this object able to retrieve it's own data without breaking encapsulation etc. Is this possible or even worthwhile for me to attempt? I poked around briefly and it looks like it would be difficult as the data access and bo layers look to be tightly bound.
Anyways hope this makes sense to you cause sometimes I confuse myself. But I am having fun figuring out how to do these things in .Net
Thanks alot
Paul