本文整理汇总了C#中IProductsRepository类的典型用法代码示例。如果您正苦于以下问题:C# IProductsRepository类的具体用法?C# IProductsRepository怎么用?C# IProductsRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProductsRepository类属于命名空间,在下文中一共展示了IProductsRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FilesViewModel
public FilesViewModel(IFilesRepository filesRepository, IAuthStore authStore, IProductsRepository productsRepository,
Func<CreateFileViewModel> createFactory, Func<EditFileViewModel> editFactory)
{
this.filesRepository = filesRepository;
this.productsRepository = productsRepository;
this.createFactory = createFactory;
this.editFactory = editFactory;
var token = authStore.LoadToken();
if (token != null)
{
IsEditor = token.IsEditor();
IsAdmin = token.IsAdmin();
}
cvs = new CollectionViewSource();
items = new ObservableCollection<FileDescription>();
cvs.Source = items;
cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
cvs.SortDescriptions.Add(new SortDescription("Id", ListSortDirection.Ascending));
editRequest = new InteractionRequest<IConfirmation>();
BrowseCommand = new DelegateCommand(Browse);
EditCommand = new DelegateCommand<FileDescription>(Edit);
deleteCommand = new DelegateCommand(PromtDelete, HasSelectedItems);
deleteRequest = new InteractionRequest<Confirmation>();
}
示例2: MainViewModel
public MainViewModel(IEventAggregator eventAggregator, ISignalRClient signalRClient, IAuthStore authStore,
IProductsRepository productsRepository)
{
this.eventAggregator = eventAggregator;
this.signalRClient = signalRClient;
this.productsRepository = productsRepository;
deleteRequest = new InteractionRequest<Confirmation>();
CreateProductCommand = new DelegateCommand(CreateProduct);
OpenProductCommand = new DelegateCommand<Product>(EditProduct);
changePriceCommand = new DelegateCommand(ChangePrice, HasSelectedProducts);
deleteCommand = new DelegateCommand(PromtDelete, HasSelectedProducts);
cvs = new CollectionViewSource();
items = new ObservableCollection<Product>();
cvs.Source = items;
cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
cvs.SortDescriptions.Add(new SortDescription("Size", ListSortDirection.Ascending));
var token = authStore.LoadToken();
if (token != null)
{
IsEditor = token.IsEditor();
IsAdmin = token.IsAdmin();
}
}
示例3: ProductsController
public ProductsController(IProductsRepository productsRepository)
{
this.productsRepository = productsRepository;
// productsRepository = new FakeProductsRepository();
// string connectionString = @"Server=.\SQLEXPRESS;Database=SportsStore;Trusted_Connection=yes;";
// productsRepository = new SqlSportsRepository(connectionString);
}
示例4: ChangePriceWindowViewModel
public ChangePriceWindowViewModel(IProductsRepository repository, IEventAggregator eventAggregator)
{
this.repository = repository;
this.eventAggregator = eventAggregator;
SaveCommand = new DelegateCommand(Save);
CancelCommand = new DelegateCommand(() => IsWindowOpen = false);
}
示例5: ManageProductsController
public ManageProductsController(IProductsRepository productsRepository, ICategoryRepository categoryRepository,
IManufacturersRepository manufacturerRepository, IProductImagesRepository productImagesRepository)
{
_productsRepository = productsRepository;
_categoryRepository = categoryRepository;
_manufacturerRepository = manufacturerRepository;
_productImagesRepository = productImagesRepository;
}
示例6: RecommendationController
public RecommendationController(ICustomerRepository customerRepository, IProductsRepository productsRepository, IPromotionsRepository promotionsRepository, ITelemetryRepository telemetryRepository)
{
// Setup Fields
_customerRepository = customerRepository;
_productsRepository = productsRepository;
_promotionsRepository = promotionsRepository;
_telemetryRepository = telemetryRepository;
}
示例7: BaseController
protected BaseController(
ICategoryRepository categoryRepository,
IManufacturersRepository manufacturersRepository,
IProductsRepository productsRepository)
{
_catRepo = categoryRepository;
_manufacturersRepository = manufacturersRepository;
_productsRepository = productsRepository;
}
示例8: BaseController
protected BaseController(
ICategoryRepository categoryRepository,
IManufacturersRepository manufacturersRepository,
IProductsRepository productsRepository)
{
CatRepo = categoryRepository;
ManufacturersRepository = manufacturersRepository;
ProductsRepository = productsRepository;
AutoLoginRememberedUser();
}
示例9: ProductBO
public ProductBO(IProductsRepository productsRepository
, IProductCategoryRepository categoriesRepository
, IProductSubcategoryRepository subcategoriesRepository)
{
_productsRepository = productsRepository;
_categoriesRepository = categoriesRepository;
_subcategoriesRepository = subcategoriesRepository;
InitMaps();
}
示例10: ProductEditViewModel
public ProductEditViewModel(IProductsRepository repository, IEventAggregator eventAggregator, IAuthStore authStore, AttachmentsViewModel attachmentsViewModel)
{
this.repository = repository;
this.eventAggregator = eventAggregator;
this.authStore = authStore;
this.attachmentsViewModel = attachmentsViewModel;
SaveCommand = new DelegateCommand<ChildWindow>(Save);
TabLoadedCommand = new DelegateCommand<object>(OnTabLoaded);
}
示例11: ChangePriceViewModel
public ChangePriceViewModel(IEnumerable<Product> products, IProductsRepository repository, IEventAggregator eventAggregator)
{
this.repository = repository;
this.eventAggregator = eventAggregator;
SaveCommand = new DelegateCommand(Save);
CancelCommand = new DelegateCommand(() => IsWindowOpen = false);
LoadItems(products);
UpdatePrice();
}
示例12: HomeController
public HomeController(
ICategoryRepository catRepo,
IProductsRepository productRepo,
IManufacturersRepository manufacturerRepo)
: base(catRepo,manufacturerRepo,productRepo)
{
homeLogic = new Home(_productsRepository);
ViewBag.Categories = GetCategories();
ViewBag.Manufacturers = GetManufacturers();
ViewBag.CategorySelectList = GetCategoryList();
}
示例13: LicensesRepository
public LicensesRepository(ScutexEntities db, IFeaturesRepository featuresRepository, IProductsRepository productsRepository,
ILicenseSetsRepository licenseSetsRepository, ITrialSettingsRepository trialSettingsRepository, IServicesRepository servicesRepository)
{
this.db = db;
_featuresRepository = featuresRepository;
_productsRepository = productsRepository;
_licenseSetsRepository = licenseSetsRepository;
_trialSettingsRepository = trialSettingsRepository;
_servicesRepository = servicesRepository;
}
示例14: HomeController
public HomeController(
ICustomerRepository customerRepository,
IProductsRepository productsRepository,
IPromotionsRepository promotionsRepository,
ITelemetryRepository telemetryRepository)
{
_customerRepository = customerRepository;
_productsRepository = productsRepository;
_promotionsRepository = promotionsRepository;
_telemetryRepository = telemetryRepository;
}
示例15: NorthwindUnitOfWork
public NorthwindUnitOfWork()
{
_dbContext = new NorthwindSlim();
_productsRepository = new ProductsRepository(_dbContext);
_customersRepository = new CustomersRepository(_dbContext);
_ordersRepository = new OrdersRepository(_dbContext);
}