本文整理汇总了C#中IProductsRepository类的典型用法代码示例。如果您正苦于以下问题:C# IProductsRepository类的具体用法?C# IProductsRepository怎么用?C# IProductsRepository使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IProductsRepository类属于命名空间,在下文中一共展示了IProductsRepository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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>();
}
开发者ID:hva,项目名称:warehouse.net,代码行数:28,代码来源:FilesViewModel.cs
示例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();
}
}
开发者ID:hva,项目名称:warehouse.net,代码行数:26,代码来源:MainViewModel.cs
示例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);
}
开发者ID:Lindi,项目名称:SportsStore,代码行数:7,代码来源:ProductsController.cs
示例4: ChangePriceWindowViewModel
public ChangePriceWindowViewModel(IProductsRepository repository, IEventAggregator eventAggregator)
{
this.repository = repository;
this.eventAggregator = eventAggregator;
SaveCommand = new DelegateCommand(Save);
CancelCommand = new DelegateCommand(() => IsWindowOpen = false);
}
开发者ID:hva,项目名称:warehouse.net,代码行数:8,代码来源:ChangePriceWindowViewModel.cs
示例5: ManageProductsController
public ManageProductsController(IProductsRepository productsRepository, ICategoryRepository categoryRepository,
IManufacturersRepository manufacturerRepository, IProductImagesRepository productImagesRepository)
{
_productsRepository = productsRepository;
_categoryRepository = categoryRepository;
_manufacturerRepository = manufacturerRepository;
_productImagesRepository = productImagesRepository;
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:8,代码来源:ManageProductsController.cs
示例6: RecommendationController
public RecommendationController(ICustomerRepository customerRepository, IProductsRepository productsRepository, IPromotionsRepository promotionsRepository, ITelemetryRepository telemetryRepository)
{
// Setup Fields
_customerRepository = customerRepository;
_productsRepository = productsRepository;
_promotionsRepository = promotionsRepository;
_telemetryRepository = telemetryRepository;
}
开发者ID:CarlRabeler,项目名称:WingTipTickets,代码行数:8,代码来源:RecommendationController.cs
示例7: BaseController
protected BaseController(
ICategoryRepository categoryRepository,
IManufacturersRepository manufacturersRepository,
IProductsRepository productsRepository)
{
_catRepo = categoryRepository;
_manufacturersRepository = manufacturersRepository;
_productsRepository = productsRepository;
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:9,代码来源:BaseController.cs
示例8: BaseController
protected BaseController(
ICategoryRepository categoryRepository,
IManufacturersRepository manufacturersRepository,
IProductsRepository productsRepository)
{
CatRepo = categoryRepository;
ManufacturersRepository = manufacturersRepository;
ProductsRepository = productsRepository;
AutoLoginRememberedUser();
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:10,代码来源:BaseController.cs
示例9: ProductBO
public ProductBO(IProductsRepository productsRepository
, IProductCategoryRepository categoriesRepository
, IProductSubcategoryRepository subcategoriesRepository)
{
_productsRepository = productsRepository;
_categoriesRepository = categoriesRepository;
_subcategoriesRepository = subcategoriesRepository;
InitMaps();
}
开发者ID:hcabnettek,项目名称:PlayingWithUntiyAndMef,代码行数:10,代码来源:ProductBO.cs
示例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);
}
开发者ID:hva,项目名称:warehouse.net,代码行数:10,代码来源:ProductEditViewModel.cs
示例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();
}
开发者ID:hva,项目名称:warehouse.net,代码行数:11,代码来源:ChangePriceViewModel.cs
示例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();
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:11,代码来源:HomeController.cs
示例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;
}
开发者ID:chantsunman,项目名称:Scutex,代码行数:11,代码来源:LicensesRepository.cs
示例14: HomeController
public HomeController(
ICustomerRepository customerRepository,
IProductsRepository productsRepository,
IPromotionsRepository promotionsRepository,
ITelemetryRepository telemetryRepository)
{
_customerRepository = customerRepository;
_productsRepository = productsRepository;
_promotionsRepository = promotionsRepository;
_telemetryRepository = telemetryRepository;
}
开发者ID:CarlRabeler,项目名称:WingTipTickets,代码行数:11,代码来源:HomeController.cs
示例15: AttachmentsViewModel
public AttachmentsViewModel(IFilesRepository filesRepository, IProductsRepository productsRepository)
{
this.filesRepository = filesRepository;
this.productsRepository = productsRepository;
BrowseCommand = new DelegateCommand(Browse);
OpenFileCommand = new DelegateCommand<FileDescription>(OpenFile);
Files = new ObservableCollection<FileDescription>();
//openDetailRequest = new InteractionRequest<AttachmentDetailViewModel>();
deleteCommand = new DelegateCommand(PromtDelete, CanDelete);
//deleteRequest = new InteractionRequest<Confirmation>();
}
开发者ID:hva,项目名称:warehouse.net,代码行数:12,代码来源:AttachmentsViewModel.cs
示例16: ProductPickerViewModel
public ProductPickerViewModel(IProductsRepository productsRepository)
{
this.productsRepository = productsRepository;
CancelCommand = new DelegateCommand(Close);
PickCommand = new DelegateCommand(Pick);
items = new ObservableCollection<ProductName>();
cvs = new CollectionViewSource { Source = items };
cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
Title = "Товарные позиции";
}
开发者ID:hva,项目名称:warehouse.net,代码行数:13,代码来源:ProductPickerViewModel.cs
示例17: OfferController
public OfferController(
ICategoryRepository catRepo,
IProductsRepository productRepo,
IManufacturersRepository manufacturersRepository)
: base(catRepo,manufacturersRepository,productRepo)
{
offerLogic = new Offer(_productsRepository);
ViewBag.Categories = GetCategories();
ViewBag.Manufacturers = GetManufacturers();
ViewBag.CategorySelectList = GetCategoryList();
ViewData["SearchOptions"] = new SelectList(Common.GetSortOptions(), "Id", "Name", 1);
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:13,代码来源:OfferController.cs
示例18: ProductsController
public ProductsController(
INhibernateConnection connection, IProductsRepository repo,
ICategoryRepository categoryRepo,
IManufacturersRepository manufacturersRepo,
IProductImagesRepository productImageRepo
)
{
_productRepo = repo;
ISessionFactory sessionFactory = connection.CreateSessionFactory();
_session = sessionFactory.OpenSession();
_categoryRepo = categoryRepo;
_manufacturersRepo = manufacturersRepo;
_productImagesRepository = productImageRepo;
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:14,代码来源:ProductsController.cs
示例19: ProductController
public ProductController(
IProductImagesRepository productImageRepo,
IProductsRepository productsRepo,
ICategoryRepository catRepo,
IManufacturersRepository manufacturersRepository)
: base(catRepo,manufacturersRepository,productsRepo)
{
_productLogic = new Product(productsRepo);
_productImagesRepository = productImageRepo;
ViewBag.Categories = GetCategories();
ViewBag.Manufacturers = GetManufacturers();
ViewBag.CategorySelectList = GetCategoryList();
ViewData["SearchOptions"] = new SelectList(Common.GetSortOptions(), "Id", "Name", 1);
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:14,代码来源:ProductController.cs
示例20: SetupController
public SetupController(ICategoryRepository catRepo, IOrderDetailsRepository orderDetailsRepository,
IOrdersRepository orderRepo, IManufacturersRepository manuRepo,
IProductImagesRepository productImgRepo, IUserRepository userRepo, INhibernateConnection conn,
IProductsRepository productRepo,
IDeliveryTypesRepository deliveryRepo)
{
_manuRepo = manuRepo;
_productRepo = productRepo;
_catRepo = catRepo;
_productImagesRepository = productImgRepo;
_userRepo = userRepo;
_ordersRepository = orderRepo;
_orderDetailsRepository = orderDetailsRepository;
_deliveryRepo = deliveryRepo;
_session = conn.CreateSessionFactory().OpenSession();
}
开发者ID:gpierzchala,项目名称:InternetStore,代码行数:16,代码来源:SetupController.cs
注:本文中的IProductsRepository类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论