@nestjs/typeorm#InjectRepository TypeScript Examples
The following examples show how to use
@nestjs/typeorm#InjectRepository.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: project.service.ts From barista with Apache License 2.0 | 6 votes |
constructor(
@Inject(forwardRef(() => ScanService))
private readonly scanService: ScanService,
@Inject(forwardRef(() => BomManualLicenseService))
private readonly bomManualLicenseService: BomManualLicenseService,
@Inject(forwardRef(() => ProjectAttributionService))
private readonly projectAttributionService: ProjectAttributionService,
@InjectRepository(Project) repo,
) {
super(repo);
}
Example #2
Source File: user.repository.ts From domain-driven-hexagon with MIT License | 6 votes |
constructor(
@InjectRepository(UserOrmEntity)
private readonly userRepository: Repository<UserOrmEntity>,
) {
super(
userRepository,
new UserOrmMapper(UserEntity, UserOrmEntity),
new Logger('UserRepository'),
);
}
Example #3
Source File: user.service.ts From svvs with MIT License | 6 votes |
/**
* Inject into UserService: userRepository
*
* @param userRepository
*/
constructor(
@InjectRepository(UserEntity)
private readonly userRepository: Repository<UserEntity>,
) {
}
Example #4
Source File: app.service.ts From nest_transact with MIT License | 6 votes |
constructor(
@InjectRepository(User)
private readonly userRepository: Repository<User>,
@InjectRepository(Purse)
private readonly purseRepository: Repository<Purse>,
/**
* [PurseSavingService] injected to current service
* and all its methods will be transactional in the transaction
* which will be initiated from the [AppController]
*/
private readonly purseSavingService: PurseSavingService,
moduleRef: ModuleRef,
) {
super(moduleRef);
}
Example #5
Source File: collections.service.ts From aqualink-app with MIT License | 6 votes |
constructor(
@InjectRepository(Collection)
private collectionRepository: Repository<Collection>,
@InjectRepository(LatestData)
private latestDataRepository: Repository<LatestData>,
@InjectRepository(Site)
private siteRepository: Repository<Site>,
@InjectRepository(Sources)
private sourcesRepository: Repository<Sources>,
) {}
Example #6
Source File: form.update.service.ts From api with GNU Affero General Public License v3.0 | 6 votes |
constructor(
@InjectRepository(FormEntity)
private readonly formRepository: Repository<FormEntity>,
@InjectRepository(FormFieldEntity)
private readonly formFieldRepository: Repository<FormFieldEntity>,
@InjectRepository(FormHookEntity)
private readonly formHookRepository: Repository<FormHookEntity>,
private readonly idService: IdService,
private readonly pageService: FormPageUpdateService,
) {
}
Example #7
Source File: contact-info.service.ts From nestjs-starter with MIT License | 6 votes |
constructor(
@InjectRepository(ContactInfo)
private readonly contactInfoRepository: Repository<ContactInfo>,
@InjectRepository(ContactAddress)
private readonly contactAddressRepository: Repository<ContactAddress>,
@InjectRepository(UserMetadata)
private readonly userMetadataRepository: Repository<UserMetadata>,
@InjectRepository(ContactPhone)
private readonly contactPhoneRepository: Repository<ContactPhone>,
@InjectRepository(User)
private readonly userRepository: Repository<User>,
private readonly userService: UsersService,
) {}
Example #8
Source File: jwt.strategy.ts From pknote-backend with GNU General Public License v3.0 | 6 votes |
constructor(
@InjectRepository(UserRepository)
private userRepository: UserRepository,
) {
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
secretOrKey: process.env.JWT_SECRET || config.get('jwt.secret'),
});
}
Example #9
Source File: comments.service.ts From NestJs-youtube with MIT License | 5 votes |
constructor(
@InjectRepository(CommentEntity)
private commentRepo: Repository<CommentEntity>,
) {
super(commentRepo);
}
Example #10
Source File: users.repository.ts From nest-js-boilerplate with MIT License | 5 votes |
constructor(
@InjectRepository(UserEntity)
private readonly usersModel: Repository<UserEntity>,
) {}
Example #11
Source File: bom-license-exception.service.ts From barista with Apache License 2.0 | 5 votes |
constructor(@InjectRepository(BomLicenseException) repo) {
super(repo);
}
Example #12
Source File: pledge.service.ts From The-TypeScript-Workshop with MIT License | 5 votes |
constructor(
@InjectRepository(Pledge)
private pledgeRepository: Repository<Pledge>,
) {}
Example #13
Source File: purse-saving.service.ts From nest_transact with MIT License | 5 votes |
constructor(
@InjectRepository(Purse)
private readonly purseRepository: Repository<Purse>,
moduleRef: ModuleRef,
) {
super(moduleRef);
}
Example #14
Source File: option.service.ts From nest-js-quiz-manager with MIT License | 5 votes |
constructor(
@InjectRepository(OptionRepository)
private optionRepository: OptionRepository,
) {}
Example #15
Source File: collection.guard.ts From aqualink-app with MIT License | 5 votes |
constructor(
@InjectRepository(Collection)
private collectionRepository: Repository<Collection>,
private reflector: Reflector,
) {}
Example #16
Source File: UserQueriesService.ts From test with BSD 3-Clause "New" or "Revised" License | 5 votes |
constructor(
@InjectRepository(User)
private readonly userRepository: Repository<User>,
) {}
Example #17
Source File: messages.service.ts From gear-js with GNU General Public License v3.0 | 5 votes |
constructor(
@InjectRepository(Message)
private readonly messageRepo: Repository<Message>,
) {}
Example #18
Source File: calendar-project.service.ts From life-helper-backend with MIT License | 5 votes |
constructor(
@InjectRepository(CalendarProject)
private readonly calendarProjectRepository: Repository<CalendarProject>
) {}
Example #19
Source File: todo.service.ts From postgres-nest-react-typescript-boilerplate with GNU General Public License v3.0 | 5 votes |
constructor(
@InjectRepository(TodoEntity)
private todoRepository: Repository<TodoEntity>,
@InjectRepository(UserEntity)
private userRepository: Repository<UserEntity>,
) {}
Example #20
Source File: form.create.service.ts From api with GNU Affero General Public License v3.0 | 5 votes |
constructor(
@InjectRepository(FormEntity)
private readonly formRepository: Repository<FormEntity>,
private readonly formPageCreateService: FormPageCreateService,
) {
}
Example #21
Source File: password-reset.service.ts From radiopanel with GNU General Public License v3.0 | 5 votes |
constructor(
@InjectRepository(PasswordReset) private passwordResetRepository: Repository<PasswordReset>,
private mailHelper: MailHelper,
private tenantService: TenantService,
) { }