コード例 #1
0
ファイル: PostsController.cs プロジェクト: hunglv51/CarSeller
        public PostsController(CarSellerContext context, IMapper mapper)
        {
            var unitOfWork     = new UnitOfWork(context);
            var postRepository = new PostRepository(context);

            _postService = new PostViewModelService(unitOfWork, postRepository, mapper);
        }
コード例 #2
0
        public NotificationsController(CarSellerContext context, IMapper mapper)
        {
            var repository = new NotificationRepository(context);
            var uow        = new UnitOfWork(context);

            _notificationService = new NotificationViewModelService(uow, repository, mapper);
        }
コード例 #3
0
        public PostCategoryController(CarSellerContext context, IMapper mapper)
        {
            var repository = new PostCategoryRepository(context);
            var uow        = new UnitOfWork(context);

            _testMapper          = mapper;
            _postCategoryService = new PostCategoryViewModelService(repository, uow, mapper);
        }
コード例 #4
0
ファイル: PostRepository.cs プロジェクト: hunglv51/CarSeller
 public PostRepository(CarSellerContext context) : base(context)
 {
 }
コード例 #5
0
ファイル: BaseRepository.cs プロジェクト: hunglv51/CarSeller
 public BaseRepository(CarSellerContext context)
 {
     _context = context;
 }
コード例 #6
0
ファイル: UserRepository.cs プロジェクト: hunglv51/CarSeller
 public UserRepository(CarSellerContext context) : base(context)
 {
 }
コード例 #7
0
 public NotificationRepository(CarSellerContext context) : base(context)
 {
 }
コード例 #8
0
ファイル: UnitOfWork.cs プロジェクト: hunglv51/CarSeller
 public UnitOfWork(CarSellerContext context)
 {
     _context = context;
 }