当前位置: 首页>>代码示例>>C#>>正文


C# ICategoryRepository类代码示例

本文整理汇总了C#中ICategoryRepository的典型用法代码示例。如果您正苦于以下问题:C# ICategoryRepository类的具体用法?C# ICategoryRepository怎么用?C# ICategoryRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICategoryRepository类属于命名空间,在下文中一共展示了ICategoryRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VotesController

        public VotesController(IPollRepository PollRepository, IUserIdentityService UserIdentityService,
            IUserRepository UserRepository, IVoteRepository VoteRepository, ICategoryRepository CategoryRepository)
        {
            if (PollRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (UserIdentityService == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (UserRepository == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (VoteRepository == null)
            {
                throw new ArgumentNullException("VoteRepository");
            }

            if (CategoryRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            this.pollRepository = PollRepository;
            this.userService = UserIdentityService;
            this.userRepository = UserRepository;
            this.voteRepository = VoteRepository;
            this.categoryRepository = CategoryRepository;
        }
开发者ID:robrich,项目名称:BetaSigmaPhi,代码行数:34,代码来源:VotesController.cs

示例2: QuestionController

 public QuestionController()
 {
     _questionRepo = ObjectFactory.GetInstance<IQuestionRepository>();
     _categoryRepo = ObjectFactory.GetInstance<ICategoryRepository>();
     _checklistRepository = ObjectFactory.GetInstance<ICheckListRepository>();
     _userForAuditingRepository = ObjectFactory.GetInstance<BusinessSafe.Domain.RepositoryContracts.IUserForAuditingRepository>();
 }      
开发者ID:mnasif786,项目名称:Business-Safe,代码行数:7,代码来源:QuestionController.cs

示例3: BaseController

 protected BaseController(
     ICategoryRepository catRepo,
     IManufacturersRepository manufacturersRepository)
 {
     _catRepo = catRepo;
     _manufacturersRepository = manufacturersRepository;
 }
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:7,代码来源:BaseController.cs

示例4: CategoryEditorViewModel

        /// <summary>
        /// Initializes a new instance of the CategoryEditorViewModel class.
        /// </summary>
        public CategoryEditorViewModel(ICategoryRepository categoryRepository)
        {
            CategoryRepository = categoryRepository;
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());
            CategoryIds = new List<Guid>();
            NotesToDelete = new List<Guid>();
            NotesToTrash = new List<Guid>();

            NewCategoryCommand = new RelayCommand(NewCategory, () => !OnCategoryUpdate);
            DeleteCategoryCommand = new RelayCommand<object>(DeleteCategory, (noused) => OnCategoryUpdate && Categories.Count > 1);
            DeleteNotesCommand = new RelayCommand<bool?>((mark) => DeleteNotesToo = mark.Value, (noused) => OnCategoryUpdate);
            AcceptCategoryCommand = new RelayCommand(AcceptCategory, () => OnCategoryUpdate && IsValid);
            CategoryBeenSelected = new RelayCommand(() => OnCategoryUpdate = true);
            SelectBgColorCommand = new RelayCommand(SelectBgColor, () => OnCategoryUpdate);
            SelectFontColorCommand = new RelayCommand(SelectFontColor, () => OnCategoryUpdate);
            DefaultCategoryChangedCommand = new RelayCommand<Category>(DefaultCategoryChanged);

            // We register a default message containing a string (See SavingCatOptions) below.
            Messenger.Default.Register<string>(this, SavingCatOptions);

            // Default category
            _defaultCategory = Categories[0]; // The default one is always the first
            if (!_defaultCategory.IsDefault) // first time?
                _defaultCategory.IsDefault = true;
        }
开发者ID:rockarthik,项目名称:surface,代码行数:28,代码来源:CategoryEditorViewModel.cs

示例5: CategoriesParser

 public CategoriesParser(ILog logger, IWebCrawler crawler, ICategoryRepository categories, IUnitOfWork uow)
 {
     this.logger = logger;
     this.crawler = crawler;
     this.categories = categories;
     this.uow = uow;
 }
开发者ID:Li0liQ,项目名称:PriceListOptimizer,代码行数:7,代码来源:CategoriesParser.cs

示例6: MainViewModel

        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IChapterRepository chapterRepository ,IBookRepository bookRepository, ICategoryRepository categoryRepository)
        {
            _chapterRepository = chapterRepository;
            _bookRepository = bookRepository;
            _categoryRepository = categoryRepository;

            Chapters = new ObservableCollection<Chapter>(_chapterRepository.FindAll());
            Books = new ObservableCollection<Book>(_bookRepository.FindAll());
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());

            SelectedBook = new Book();
            SelectedCategory = new Category();
            SelectedChapter = new Chapter();

            //
            Books.Add(new Book(1,"Cánh đồng bất tận", "Nguyễn Ngọc Tư","2011","NXB Tuổi Trẻ",new Media(),new Media()));
            Books.Add(new Book(1, "Sống để kể lại", "Nguyễn Ngọc Tư", "2011", "NXB Tuổi Trẻ", new Media(), new Media()));

            Categories.Add(new Category(1, "Cuộc sống", new Media()));
            Categories.Add(new Category(1, "Tình yêu", new Media()));
            Categories.Add(new Category(1, "Kỹ năng", new Media()));

            Chapters.Add(new Chapter(1, "Giới thiệu sách nói", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Trở thành biên tập viên ở El Espectador", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Thử lửa với công việc phóng viên xung kích", new Media(), new Media()));
            Chapters.Add(new Chapter(1, "Công việc viết phê bình điện ảnh", new Media(), new Media()));
        }
开发者ID:senviet,项目名称:Invisiblebook,代码行数:30,代码来源:MainViewModel.cs

示例7: HomeController

 public HomeController(ICategoryRepository categoryRepository, IProductRepository productRepository,
     IConstants constants)
 {
     _categoryRepository = categoryRepository;
     _productRepository = productRepository;
     _constants = constants;
 }
开发者ID:stephengodbold,项目名称:searchpdproj,代码行数:7,代码来源:HomeController.cs

示例8: AnalyticsController

 public AnalyticsController(ISubCategoryRepository repo, ICategoryRepository repoCat,IUserRepository repoUser,IQuizRepository repoQuiz)
 {
     _repo = repo;
     _repoCat = repoCat;
     _repoUser = repoUser;
     _repoQuiz = repoQuiz;
 }
开发者ID:vishalavalani,项目名称:Quiz-App,代码行数:7,代码来源:AnalyticsController.cs

示例9: DishService

 public DishService(IDishRepository dishRepository, ICategoryRepository categoryRepository, IMarkupRepository markupRepository, IUnitOfWork unitOfWork)
 {
     _dishRepository = dishRepository;
     _categoryRepository = categoryRepository;
     _markupRepository = markupRepository;
     _unitOfWork = unitOfWork;
 }
开发者ID:checherynda,项目名称:project,代码行数:7,代码来源:DishService.cs

示例10: ProductCatalogService

        public ProductCatalogService(IProductTitleRepository productTitleRepository, IProductRepository productRepository,
			ICategoryRepository categoryRepository)
        {
            _productTitleRepository = productTitleRepository;
            _productRepository = productRepository;
            _categoryRepository = categoryRepository;
        }
开发者ID:afrancocode,项目名称:Storefront,代码行数:7,代码来源:ProductCatalogService.cs

示例11: MainViewModel

        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(INoteRepository noteRepository, ICategoryRepository categoryRepository)
        {
            _noteRepository = noteRepository;
            _categoryRepository = categoryRepository;

            Notes = new ObservableCollection<Note>(_noteRepository.FindAll());
            Categories = new ObservableCollection<Category>(_categoryRepository.FindAll());

            // Is there categories list empty?
            if (Categories.Count == 0)
            {
                // In this case, I will create a default category with a welcome note
                var cat = new Category(Resources.Strings.GeneralCat, "#33CC00", "#FFFFFF");
                Categories.Add(cat);
                _categoryRepository.SaveAll(Categories);

                var note = new Note(Resources.Strings.WelcomeMessage, cat);
                Notes.Add(note);
                _noteRepository.Save(note);
            }

            ActualNote = new Note();
            SelectedCategory = _categories[0]; // We need to this for Category's ComboBox sake.
            Trash = new Category("Trash", "#f8f8f8", "#777777");

            AddNoteCommand = new RelayCommand(AddNote, CanAddNote);
            EditNoteCommand = new RelayCommand<Note>(EditNote);
            DeleteNoteCommand = new RelayCommand<Note>(DeleteNote);
            DeleteAllNotesCommand = new RelayCommand(DeleteAllNotes);
            CategoryOptionsCommand = new RelayCommand(OpenCategoryOptions);

            // We expect a message with some lists with changes.
            Messenger.Default.Register<CategoryEditorChangesMessage>(this, MakingNewCatChanges);
        }
开发者ID:rockarthik,项目名称:surface,代码行数:37,代码来源:MainViewModel.cs

示例12: ProductController

 public ProductController(IProductRepository productRepo,
                         ICategoryRepository categoryRepo)
 {
     _categoryRepo = categoryRepo;
     _productRepo = productRepo;
     PageSize = 5;
 }
开发者ID:awt2gbg2012,项目名称:Lektion12,代码行数:7,代码来源:ProductController.cs

示例13: PollsApiController

        public PollsApiController(IPollRepository PollRepository, ICategoryRepository CategoryRepository,  IFrequencyRepository FrequencyRepository, IUserIdentityService UserIdentityService, IUserRepository UserRepository)
        {
            if (PollRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (CategoryRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (FrequencyRepository == null)
            {
                throw new ArgumentNullException("CategoryRepository");
            }

            if (UserIdentityService == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            if (UserRepository == null)
            {
                throw new ArgumentNullException("UserIdentityService");
            }

            this.pollRepository = PollRepository;
            this.categoryRepository = CategoryRepository;
            this.frequencyRepository = FrequencyRepository;
            this.userService = UserIdentityService;
            this.userRepository = UserRepository;
        }
开发者ID:robrich,项目名称:BetaSigmaPhi,代码行数:33,代码来源:PollsApiController.cs

示例14: SelectCategoryListViewModel

 /// <summary>
 ///     Creates an CategoryListViewModel for the usage of providing a CategoryViewModel selection.
 /// </summary>
 /// <param name="categoryRepository">An instance of <see cref="IRepository{T}" />.</param>
 /// <param name="modifyDialogService">An instance of <see cref="IModifyDialogService" /></param>
 /// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
 /// <param name="messenger">An instance of <see cref="IMvxMessenger" /></param>
 public SelectCategoryListViewModel(ICategoryRepository categoryRepository,
     IModifyDialogService modifyDialogService,
     IDialogService dialogService, IMvxMessenger messenger) 
     : base(categoryRepository, modifyDialogService, dialogService)
 {
     this.messenger = messenger;
 }
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:14,代码来源:SelectCategoryListViewModel.cs

示例15: TransactionApp

 public TransactionApp(ITransactionRepository transactionRepository, IAccountRepository accountRepository, ICategoryRepository categoryRepository, IPropertyRepository propertyRepository)
 {
     _transactionRepository = transactionRepository;
     _accountRepository = accountRepository;
     _categoryRepository = categoryRepository;
     _propertyRepository = propertyRepository;
 }
开发者ID:essgineer,项目名称:Finance,代码行数:7,代码来源:TransactionApp.cs


注:本文中的ICategoryRepository类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。