Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace F.BL
- {
- public class ForumManager : IForumManager
- {
- private IForumRepository repo;
- public ForumManager()
- {
- repo = new ForumRepository();
- }
- public void Add<C>(C objectToAdd) where C : class
- {
- repo.Create<C>(objectToAdd);
- }
- public IEnumerable<C> GetObjects<C>() where C : class
- {
- return repo.ReadObjects<C>();
- }
- public C Get<C>(int objectId) where C : class
- {
- return repo.Read<C>(objectId);
- }
- public void Remove<C>(int objectId) where C : class
- {
- repo.Delete<C>(objectId);
- }
- public IEnumerable<D> GetXFromY<D, C>(int objectId) where C : class, IHasList<object>
- {
- return repo.ReadXFromY<D, C>(objectId);
- }
- public C GetByName<C>(string objectName) where C : class, IHasUniqueName
- {
- return repo.ReadByName<C>(objectName);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment