Thank you Frans and Bruno for your help. In the end I managed to get it to
work.

I created an interface like below:

public interface IDataManager<T>
{
   List<T> SelectData();
   int UpdateData(T objectToBeUpdated);
   ...
}

and then in the implementation I did as follows:

public class StoreGroupDataManager : IDataManager<StoreGroup>
{

#region Implementation of IDataManager<T>

   public List<StoreGroup> SelectData()
{...}

   public int UpdateData(StoreGroup objectToBeUpdated)
{...}
#endregion
}


This is not as flexible as using ArrayLists and avoiding generics
(hence Frans warning about mixing generics with interfaces) but
is flexible enough to allow me to pick among different
IDataManager<StoreGroup> implementations in my business layer.

I am loosing a little bit of flexibility but I'm hoping to increase the
performance due to the use of generics over ArrayLists.

Does anyone have any thoughts about this?


Regards,
Yago

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to