コード例 #1
0
 public static IRepositoryService<VideoPost> Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IRepository<VideoPost> videoPostRepository = new VideoPostRepository(databaseFactory);
     return new VideoPostEntityService((IVideoPostRepository) videoPostRepository, unitOfWork);
 }
コード例 #2
0
 public static IRepositoryService<Comment> Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IRepository<Comment> commentRepository = new CommentRepository(databaseFactory);
     return new CommentEntityService((ICommentRepository) commentRepository, unitOfWork);
 }
コード例 #3
0
 public static IRepositoryService<Role> Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IRepository<Role> roleRepository = new RoleRepository(databaseFactory);
     return new RoleEntityService((IRoleRepository)roleRepository, unitOfWork);
 }
コード例 #4
0
 public static ContentEntityService Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IContentRepository contentRepository = new ContentRepository(databaseFactory);
     return new ContentEntityService(contentRepository, unitOfWork);
 }
コード例 #5
0
 public static IRepositoryService<User> Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IRepository<User> userRepository = new UserRepository(databaseFactory);
     return new UserEntityService((IUserRepository) userRepository, unitOfWork);
 }
コード例 #6
0
 public static IRepositoryService<Subscribe> Create()
 {
     IDatabaseFactory databaseFactory = new DatabaseFactory();
     IUnitOfWork unitOfWork = new UnitOfWork(databaseFactory);
     IRepository<Subscribe> subscribeRepository = new SubscribeRepository(databaseFactory);
     return new SubscribeEntityService((ISubscribeRepository) subscribeRepository, unitOfWork);
 }