Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating interfaces when return type is entity list
Message
From
31/03/2011 14:03:18
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
31/03/2011 10:10:01
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01505681
Message ID:
01505737
Views:
45
>Posting code on this would make it even more confusing. Heres the basic problem again. The problem isnt code specific.
>Each of the 4 BOs (all of which are in different business projects and have slightly different data/entities)
>Have a Get EntityListbyDLN method that returns and entite list of DataCaptureEntity (the entity is specific to that businness project).
>
>Heres an example:
>
>Public Function GetEntityListbyDLN(ByVal DLN As Int64) As mmBindingList(Of DataCaptureReturnEntity)
> Return Me.EntityList
> End Function
>This same method call exists in all four business projects DataCap business object. Each one of the DataCaptureReturnEntity in mmBindingList is specific to its DataCap business object.
>Follow so far?
>
>Each of the 4 BO’s implement and interface from a baselib project
>IdataCap . I want a method signature on that interface to be implemented on all 4 BO’s for the GetEntityListbyDLN function.
>So it would looks something like this
>
>Public interface IDataCap
> Function GetEntityListbyDLN(ByVal DLN As Int64) As mmBindingList(Of “SOMETHING”)
>End Interface
>
>The problem is that no matter what I try using in place of “SOMETHING”
>I cant get it to work on the BO’s end.


So if I am getting the jest of it, you want to return an entitylist from a business object (but it could be one of four) and the EntityList returned needs to be of the type in that Business Project type. Is that correct?

If you have a method in four different business projects that return a entity that is the same entity but created in a different project they are not the same Type. Some other options will need to be explored. Maybe the Entity objects if they are the same can be shared amongst the four business projects by moving them to a common entity Project. It does make me wonder what is different between these business projects that led you to need them in different projects. I suppose you could create a Business Broker project that does the magic for you as an intermediary. Just thinking ouloud and out of the box a bit.
Tim
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform