Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 different base classes or 1 class or something else?
Message
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01613723
Message ID:
01613751
Views:
26
>Not absolutely sure I understand your requirements but something like ? :
public class RepositoryBase<T> where T:class
>    {
>        private List<T> _list;
>        protected RepositoryBase(List<T> x )
>        {
>            _list = x;
>        }
>    }
>
>    public class GuestBase<T,TList> : RepositoryBase<T> where T:class where TList:class
>    {
>        protected GuestBase(List<T> thing) : base(thing)
>        {}
>    }
>
>    public class GuestRepository : GuestBase<X,Guests>
>    {
>        private List<Guests> _guests; 
>        public GuestRepository(List<X> xx, List<Guests> guests ) : base(xx)
>        {
>            _guests = guests;
>        }
>    }
I'll see if I can go from here. What about the interface? Our current baseRepository is also using the interface, e.g.
public abstract class RepositoryBase<T> : IRepository<T> where T : class
What should I do with this?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform