Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class BaseDoc
- {
- public string User;
- }
- public class DocumentA: BaseDoc {}
- public class DocumentB: BaseDoc {}
- public class DocumentC: BaseDoc {}
- public class DocumentD: BaseDoc {}
- public class DocumentE: BaseDoc {}
- public class DocumentF: BaseDoc {}
- public class DocumentG: BaseDoc {}
- public class DocumentH: BaseDoc {}
- public class DocumentRepository<T> where T: BaseDoc
- {
- public List<T> documents;
- public DocumentRepository()
- {
- documents = new List<T>();
- }
- public IEnumerable<T> GetUserDocuments(string user)
- {
- return documents.Where(x => x.User == user);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment