Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here are a couple ideas, thoughts:</p> <p>You are trying to achieve decoupling between your presentation (user control) and your business object's specific type. </p> <p>But are having challenges because you have tightly coupled the data access (DataManager) and the presentation (user control) of your application. </p> <p>Maybe you should shift your goal to decoupling your presentation layer from your business objects and data layer.</p> <p>Some ideas that might help you achieve this include: 1) Consider creating a property on the user control that holds the data and set this property in the page load or page init..if you find yourself fighting the page lifecyle because the control page load fires before the page's page load event simply create your own bind method on your custom user control and call it after you set the user controls property with data 2) Create an interface or view model for the data being passed into the user control and use this as the type of the property that holds your data-- you could keep the type generic but I'm struggling to think of a user control that will work with any business object I can dream up so this seems like a bad idea 3) Regardless of the implementation details your DataManager having a reference to the user control is what you need to change. An object called DataManager should have a single responsibility and that should be getting data and have no knowledge of the user control or presentation of your application</p> <p>I hope this helps. Just one guys opinion, good luck.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload