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


C# IGenericRepository类代码示例

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


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

示例1: LoanController

 public LoanController(IEmailService mailService, IGenericRepository<Component> componentRepo, IGenericRepository<LoanInformation> loanInformationRepo, IGenericRepository<Loaner> loanerRepo)
 {
     _componentRepo = componentRepo;
     _loanInformationRepo = loanInformationRepo;
     _loanerRepo = loanerRepo;
     _mailService = mailService;
 }
开发者ID:JacobOJ,项目名称:ITTWEB_ASS1,代码行数:7,代码来源:LoanController.cs

示例2: ComponentController

 public ComponentController(IGenericRepository<ComponentModel> componentRepository,
     IGenericRepository<ComponentCategoryModel> componentCategoryRepository 
     )
 {
     _componentRepo = componentRepository;
     _componentCategoryRepo = componentCategoryRepository;
 }
开发者ID:mtoksen,项目名称:ittweb2,代码行数:7,代码来源:ComponentController.cs

示例3: UnitOfWork

 public UnitOfWork(IGenericRepository<Recipe> recipeRepository, IGenericRepository<Region> regionRepository,
     IGenericRepository<Category> categoryRepository)
 {
     this.recipeRepository = recipeRepository;
     this.regionRepository = regionRepository;
     this.categoryRepository = categoryRepository;
 }
开发者ID:frazchaudhry,项目名称:ProjectFood,代码行数:7,代码来源:UnitOfWork.cs

示例4: ProductService

 public ProductService(
     IUnitOfWork unitOfWork, 
     IGenericRepository<Product> productRepository)
 {
     UnitOfWork = unitOfWork;
     _productRepository = productRepository;
 }
开发者ID:BernieCook,项目名称:CacheAspect,代码行数:7,代码来源:ProductService.cs

示例5: SyncWithTokenController

 public SyncWithTokenController(IUnitOfWork uow, IGenericRepository<Rate> rateRepo, IGenericRepository<Core.DomainModel.Profile> profileRepo, IGenericRepository<Token> tokenRepo)
 {
     _uow = uow;
     _profileRepo = profileRepo;
     _tokenRepo = tokenRepo;
     _rateRepo = rateRepo;
 }
开发者ID:os2indberetning,项目名称:os2_app_webapi,代码行数:7,代码来源:SyncWithTokenController.cs

示例6: EveOnlineService

 public EveOnlineService(
     IUnitOfWork unitOfWork,
     IEveOnlineConstellationRepository eveOnlineConstellationRepository,
     IEveOnlineTypeRepository eveOnlineTypeRepository,
     IEveOnlineRegionRepository eveOnlineRegionRepository,
     IEveOnlineSolarSystemRepository eveOnlineSolarSystemRepository,
     IGenericRepository<EveOnlineSkill> eveOnlineSkillRepository,
     IGenericRepository<EveOnlineSkillGroup> eveOnlineSkillGroupRepository,
     IGenericRepository<EveOnlineSkillTree> eveOnlineSkillTreeRepository,
     IEveOnlineRequiredSkillRepository eveOnlineRequiredSkillRepository,
     IGenericRepository<EveOnlineAttribute> eveOnlineAttributeRepository,
     IGenericRepository<UserLog> userLogRepository,
     IRoleRepository roleRepository)
 {
     UnitOfWork = unitOfWork;
     _eveOnlineConstellationRepository = eveOnlineConstellationRepository;
     _eveOnlineTypeRepository = eveOnlineTypeRepository;
     _eveOnlineRegionRepository = eveOnlineRegionRepository;
     _eveOnlineSolarSystemRepository = eveOnlineSolarSystemRepository;
     _eveOnlineSkillRepository = eveOnlineSkillRepository;
     _eveOnlineSkillGroupRepository = eveOnlineSkillGroupRepository;
     _eveOnlineSkillTreeRepository = eveOnlineSkillTreeRepository;
     _eveOnlineRequiredSkillRepository = eveOnlineRequiredSkillRepository;
     _eveOnlineAttributeRepository = eveOnlineAttributeRepository;
     _userLogRepository = userLogRepository;
     _roleRepository = roleRepository;
 }
开发者ID:BernieCook,项目名称:FallenNova,代码行数:27,代码来源:EveOnlineService.cs

示例7: BrowseBySupplierController

     public BrowseBySupplierController(IGenericRepository<Meal> inMeal,
 IGenericRepository<Supplier> inSupplier, IGenericRepository<Category> inCat)
     {
         mealRepo = inMeal;
         supplierRepo = inSupplier;
         categoryRepo = inCat;
     }
开发者ID:alantsai,项目名称:MVCEasyOrderSystem,代码行数:7,代码来源:BrowseBySupplierController.cs

示例8: VideoGalleryService

 public VideoGalleryService(IUnitOfWork unitOfWork, IGenericRepository<VideoGallery> videoGalleryRepository, IGenericRepository<Project> projectRepository, IGenericRepository<Video> videoRepository)
 {
     this.unitOfWork = unitOfWork;
     this.videoGalleryRepository = videoGalleryRepository;
     this.projectRepository = projectRepository;
     this.videoRepository = videoRepository;
 }
开发者ID:johannest09,项目名称:Xland2014,代码行数:7,代码来源:VideoGalleryService.cs

示例9: AccountTypeController

 public AccountTypeController(IGenericRepository<AccountType> repository, IGenericRepository<Asset> repositoryAssets, IPimsIdentityService identityService, IGenericRepository<Investor> repositoryInvestor)
 {
     _repository = repository;
     _repositoryAssets = repositoryAssets;
     _identityService = identityService;
     _repositoryInvestor = repositoryInvestor;
 }
开发者ID:RichardPAsch,项目名称:PIMS,代码行数:7,代码来源:AccountTypeController.cs

示例10: UserService

 public UserService(IUnitOfWork unitOfWork, IGenericRepository<User> userRepository)
 {
     if (unitOfWork == null) throw new ArgumentNullException("unitOfWork");
     if (userRepository == null) throw new ArgumentNullException("userRepository");
     this.unitOfWork = unitOfWork;
     this.userRepository = userRepository;
 }
开发者ID:shawnmclean,项目名称:OnionArchitecture,代码行数:7,代码来源:UserService.cs

示例11: SubmitDriveController

 public SubmitDriveController(IUnitOfWork uow, IGenericRepository<Rate> rateRepo, IGenericRepository<DriveReport> driveReportRepo, IGenericRepository<Token> tokenRepo)
 {
     _uow = uow;
     _driveReportRepo = driveReportRepo;
     _tokenRepo = tokenRepo;
     _rateRepo = rateRepo;
 }
开发者ID:os2indberetning,项目名称:os2_app_webapi,代码行数:7,代码来源:SubmitDriveController.cs

示例12: SupplierService

 public SupplierService(
     IUnitOfWork unitOfWork, 
     IGenericRepository<Supplier> supplierRepository)
 {
     UnitOfWork = unitOfWork;
     _supplierRepository = supplierRepository;
 }
开发者ID:BernieCook,项目名称:CacheAspect,代码行数:7,代码来源:SupplierService.cs

示例13: StudentController

        public StudentController(IGenericRepository repository, 
            IMapper<Student, ProfileModel> studentToProfileModelMapper,
            IMapper<Student, IndexModel> studentToStudentIndexModelMapper,
            IMapper<NameModel, Student> studentNameToStudentMapper, 
            IMapper<HomeAddressModel, StudentAddress> studentHomeAddressToStudentMapper,
            AzureStorageUploader fileUploader, IStudentRepository studentRepository,
            IMapper<EditableStudentBiographicalInfoModel, Student> studentBiographicalInfoToStudentMapper, 
            IParentRepository parentRepository, 
            IMapper<EditProfileParentModel, Parent> editProfileParentModelToParentMapper,
            ProgramStatusModelToProgramStatusForEditMapper programStatusModelToProgramStatusForEditMapper, 
			EditAcademicDetailModelToStudentAcademicDetailMapper editAcademicDetailModelToStudentAcademicDetailMapper)
        {
            _repository = repository;
            _studentToProfileModelMapper = studentToProfileModelMapper;
            _studentToStudentIndexModelMapper = studentToStudentIndexModelMapper;
            _fileUploader = fileUploader;
            _studentRepository = studentRepository;
            _studentBiographicalInfoToStudentMapper = studentBiographicalInfoToStudentMapper;
            _studentNameToStudentMapper = studentNameToStudentMapper;
            _studentHomeAddressToStudentMapper = studentHomeAddressToStudentMapper;
            _parentRepository = parentRepository;
            _editProfileParentModelToParentMapper = editProfileParentModelToParentMapper;
            _programStatusModelToProgramStatusForEditMapper = programStatusModelToProgramStatusForEditMapper;
            _editAcademicDetailModelToStudentAcademicDetailMapper = editAcademicDetailModelToStudentAcademicDetailMapper;
        }
开发者ID:InnovateEDUNYC,项目名称:NGLV1,代码行数:25,代码来源:StudentController.cs

示例14: SetUpGenericRepositoryStub

        private void SetUpGenericRepositoryStub()
        {
            _genericRepository = Substitute.For<IGenericRepository>();
            _summer2010 = new Web.Data.Entities.Session
            {
                SessionName = "Summer 2010",
                BeginDate = new DateTime(2010, 6, 1),
                EndDate = new DateTime(2010, 8, 30)
            };

            _fall2010 = new Web.Data.Entities.Session
            {
                SessionName = "Fall 2010",
                BeginDate = new DateTime(2010, 10, 1),
                EndDate = new DateTime(2011, 1, 3)
            };
            _spring2010 = new Web.Data.Entities.Session
            {
                SessionName = "Spring 2010",
                BeginDate = new DateTime(2010, 01, 1),
                EndDate = new DateTime(2010, 5, 01)
            };

            IEnumerable<Web.Data.Entities.Session> sessionList = new List<Web.Data.Entities.Session>
            {
                _summer2010,
                _fall2010,
                _spring2010
            };

            _genericRepository.GetAll<Web.Data.Entities.Session>().Returns(sessionList);
        }
开发者ID:InnovateEDUNYC,项目名称:NGLV1,代码行数:32,代码来源:SessionFiltersTests.cs

示例15: PhotoSaveService

        public PhotoSaveService(IUnitOfWork uof)
        {

            photosDb = uof.Repository<Photo>();
            usersDb = uof.Repository<User>();
            accountsDb = uof.Repository<Account>();
        }
开发者ID:chiselko6,项目名称:Glinterion,代码行数:7,代码来源:PhotoSaveService.cs


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