• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ICategoryRepository类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: AbstractCategoryListViewModel

 /// <summary>
 ///     Baseclass for the categorylist usercontrol
 /// </summary>
 /// <param name="categoryRepository">An instance of <see cref="IRepository{CategoryViewModel}" />.</param>
 /// <param name="modifyDialogService">An instance of <see cref="IModifyDialogService"/> to display a context dialog.</param>
 /// <param name="dialogService">An instance of <see cref="IDialogService" /></param>
 protected AbstractCategoryListViewModel(ICategoryRepository categoryRepository,
    IModifyDialogService modifyDialogService, IDialogService dialogService)
 {
     DialogService = dialogService;
     ModifyDialogService = modifyDialogService;
     CategoryRepository = categoryRepository;
 }
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:13,代码来源:AbstractCategoryListViewModel.cs


示例17: ProductController

 public ProductController(IProductRepository pRepository, IConfigRepository conf, ICategoryRepository cRep, ICategoryRepository catRep)
 {
     _cRep = cRep;
     _pRepository = pRepository;
     _conf = conf;
     _catRep = catRep;
 }
开发者ID:crew1248,项目名称:web_store,代码行数:7,代码来源:ProductController.cs


示例18: Archive

 internal Archive(
     IContentRepository contentRep,
     IArchiveRepository archiveRep,
     ILinkRepository linkRep,
     IExtendFieldRepository extendRep,
     ICategoryRepository categoryRep,
     ITemplateRepository templateRep,
     int id,
     string strId,
     int categoryId,
     string title)
     : base(
         contentRep,
         extendRep,
         categoryRep,
         templateRep,
         linkRep,
         id,
         categoryId,
         title
         )
 {
     this.StrId = strId;
     this._archiveRep = archiveRep;
     this._templateRep = templateRep;
 }
开发者ID:coodream,项目名称:cms,代码行数:26,代码来源:Archive.cs


示例19: AlbumsController

        public AlbumsController(ICategoryRepository categoryRepository, IAlbumRepository albumRepository, ImageRepository imageRepository)
        {
            this.categoryRepository = categoryRepository;
            this.albumRepository = albumRepository;
            this.imageRepository = imageRepository;

        }
开发者ID:cjackson234,项目名称:DsignElixir,代码行数:7,代码来源:AlbumsController.cs


示例20: ProductController

 public ProductController(IProductRepository productRepository, ICategoryRepository categoryRepository, 
     ICategoryPresenter categoryPresenter)
 {
     _productRepository = productRepository;
     _categoryRepository = categoryRepository;
     _categoryPresenter = categoryPresenter;
 }
开发者ID:alpinebreeze,项目名称:CatalogManager,代码行数:7,代码来源:ProductController.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICategoryService类代码示例发布时间:2022-05-24
下一篇:
C# ICategory类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap