本文整理汇总了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;
}
示例2: ComponentController
public ComponentController(IGenericRepository<ComponentModel> componentRepository,
IGenericRepository<ComponentCategoryModel> componentCategoryRepository
)
{
_componentRepo = componentRepository;
_componentCategoryRepo = componentCategoryRepository;
}
示例3: UnitOfWork
public UnitOfWork(IGenericRepository<Recipe> recipeRepository, IGenericRepository<Region> regionRepository,
IGenericRepository<Category> categoryRepository)
{
this.recipeRepository = recipeRepository;
this.regionRepository = regionRepository;
this.categoryRepository = categoryRepository;
}
示例4: ProductService
public ProductService(
IUnitOfWork unitOfWork,
IGenericRepository<Product> productRepository)
{
UnitOfWork = unitOfWork;
_productRepository = productRepository;
}
示例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;
}
示例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;
}
示例7: BrowseBySupplierController
public BrowseBySupplierController(IGenericRepository<Meal> inMeal,
IGenericRepository<Supplier> inSupplier, IGenericRepository<Category> inCat)
{
mealRepo = inMeal;
supplierRepo = inSupplier;
categoryRepo = inCat;
}
示例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;
}
示例9: AccountTypeController
public AccountTypeController(IGenericRepository<AccountType> repository, IGenericRepository<Asset> repositoryAssets, IPimsIdentityService identityService, IGenericRepository<Investor> repositoryInvestor)
{
_repository = repository;
_repositoryAssets = repositoryAssets;
_identityService = identityService;
_repositoryInvestor = repositoryInvestor;
}
示例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;
}
示例11: SubmitDriveController
public SubmitDriveController(IUnitOfWork uow, IGenericRepository<Rate> rateRepo, IGenericRepository<DriveReport> driveReportRepo, IGenericRepository<Token> tokenRepo)
{
_uow = uow;
_driveReportRepo = driveReportRepo;
_tokenRepo = tokenRepo;
_rateRepo = rateRepo;
}
示例12: SupplierService
public SupplierService(
IUnitOfWork unitOfWork,
IGenericRepository<Supplier> supplierRepository)
{
UnitOfWork = unitOfWork;
_supplierRepository = supplierRepository;
}
示例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;
}
示例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);
}
示例15: PhotoSaveService
public PhotoSaveService(IUnitOfWork uof)
{
photosDb = uof.Repository<Photo>();
usersDb = uof.Repository<User>();
accountsDb = uof.Repository<Account>();
}