本文整理汇总了C#中IDbRepository类的典型用法代码示例。如果您正苦于以下问题:C# IDbRepository类的具体用法?C# IDbRepository怎么用?C# IDbRepository使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDbRepository类属于命名空间,在下文中一共展示了IDbRepository类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UserServices
public UserServices(IDbGenericRepository<User, string> userRepos, IDbRepository<UserComment> userCommentRepos)
{
this.userRepos = userRepos;
this.dbContext = new TripDestinationDbContext();
this.userManager = new UserManager<User>(new UserStore<User>(this.dbContext));
this.userCommentRepos = userCommentRepos;
}
示例2: SatisticsService
public SatisticsService(IDbRepository<Tutorial> tutorials, IDbRepository<Review> reviews, IDbRepository<Comment> comments, IDbRepository<Like> likes)
{
this.tutorials = tutorials;
this.reviews = reviews;
this.comments = comments;
this.likes = likes;
}
示例3: TvShowsService
public TvShowsService(IDbRepository<TvShow> shows, IDbRepository<Actor> actors, IDbRepository<Tag> tags, IDbRepository<TvShowChannel> channels)
{
this.shows = shows;
this.actors = actors;
this.tags = tags;
this.channels = channels;
}
示例4: PublicItemController
public PublicItemController(
IDbRepository<Item> items,
IDbRepository<Image> images)
{
this.dataItem = items;
this.dataImage = images;
}
示例5: JoinOrganizationService
public JoinOrganizationService(
IDbRepository<JoinOrganizationRequest> joinOrganizationRequests,
IDbRepository<User> users)
{
this.joinOrganizationRequests = joinOrganizationRequests;
this.users = users;
}
示例6: JokesService
public JokesService(
IDbRepository<Joke> jokes,
IIdentifierProvider identifierProvider)
{
this.jokes = jokes;
this.identifierProvider = identifierProvider;
}
示例7: GenerateBattles
public int GenerateBattles(IDbRepository<Team> teamsRepository, IDbRepository<Battle> battlesRepository, int competitionId)
{
var teams = teamsRepository.All().Where(x => x.CompetitionId == competitionId).Select(x => new { x.Id }).ToList();
var newBattles = 0;
for (var i = 0; i < teams.Count; i++)
{
for (int j = i + 1; j < teams.Count; j++)
{
var firstTeam = teams[i];
var secondTeam = teams[j];
if (battlesRepository.All().Any(
x =>
(x.FirstTeamId == firstTeam.Id && x.SecondTeamId == secondTeam.Id)
|| (x.FirstTeamId == secondTeam.Id && x.FirstTeamId == firstTeam.Id)))
{
// Battle already exists
continue;
}
newBattles++;
battlesRepository.Add(new Battle { FirstTeamId = firstTeam.Id, SecondTeamId = secondTeam.Id });
}
}
battlesRepository.Save();
return newBattles;
}
示例8: StoryService
public StoryService(
IDbRepository<Story> storyRepository,
IDbRepository<Genre> genreRepository)
{
this.storyRepository = storyRepository;
this.genreRepository = genreRepository;
}
示例9: ProductsController
public ProductsController(IDbRepository<Product> products, IDbRepository<Category> categories)
{
this.products = products;
this.categories = categories;
ViewData["ActiveMenuName"] = "Products";
}
示例10: TripServices
public TripServices(IDbRepository<Trip> tripRepos, IDbRepository<PassengerTrip> passengerTripsRepos, IUserServices userServices, INotificationServices notificationServices)
{
this.tripRepos = tripRepos;
this.passengerTripsRepos = passengerTripsRepos;
this.userServices = userServices;
this.notificationServices = notificationServices;
}
示例11: MoviesService
public MoviesService(IDbRepository<Movie> movies, IDbRepository<Actor> actors, IDbRepository<Tag> tags, IDbRepository<Director> directors, IDbRepository<MovieStudio> studios)
{
this.movies = movies;
this.actors = actors;
this.directors = directors;
this.tags = tags;
this.studios = studios;
}
示例12: AuctionController
public AuctionController(IDbRepository<Auction> auctions,
IDbRepository<Item> items,
IAuctionService auctionService)
{
this.dataAuction = auctions;
this.dataItem = items;
this.auctionService = auctionService;
}
示例13: OrganizationsService
public OrganizationsService(
IDbRepository<Organization> organizations,
IDbRepository<User> users,
IOrganizationImagesService organizationImages)
{
this.organizations = organizations;
this.users = users;
this.organizationImages = organizationImages;
}
示例14: StatisticsService
public StatisticsService(
IDbRepository<Story> storyRepository,
IDbRepository<Chapter> chapterRepository,
IDbRepository<Genre> genreRepository)
{
this.storyRepository = storyRepository;
this.chapterRepository = chapterRepository;
this.genreRepository = genreRepository;
}
示例15: WishListController
public WishListController(
IProductService products,
IDbRepository<Wishlist> wishLists,
IService<Product> productsService)
{
this.productsService = productsService;
this.products = products;
this.wishLists = wishLists;
}