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


C# IDbRepository类代码示例

本文整理汇总了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;
 }
开发者ID:simeonpp,项目名称:Trip-Destination,代码行数:7,代码来源:UserServices.cs

示例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;
 }
开发者ID:Novkirishki,项目名称:BoardGames,代码行数:7,代码来源:SatisticsService.cs

示例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;
 }
开发者ID:Vyara,项目名称:SciHub,代码行数:7,代码来源:TvShowsService.cs

示例4: PublicItemController

 public PublicItemController(
     IDbRepository<Item> items,
     IDbRepository<Image> images)
 {
     this.dataItem = items;
     this.dataImage = images;
 }
开发者ID:MarinMarinov,项目名称:ASP.NET-MVC-Graduation-Project,代码行数:7,代码来源:PublicItemController.cs

示例5: JoinOrganizationService

 public JoinOrganizationService(
     IDbRepository<JoinOrganizationRequest> joinOrganizationRequests,
     IDbRepository<User> users)
 {
     this.joinOrganizationRequests = joinOrganizationRequests;
     this.users = users;
 }
开发者ID:ni4ka7a,项目名称:GoDrive,代码行数:7,代码来源:JoinOrganizationService.cs

示例6: JokesService

 public JokesService(
     IDbRepository<Joke> jokes,
     IIdentifierProvider identifierProvider)
 {
     this.jokes = jokes;
     this.identifierProvider = identifierProvider;
 }
开发者ID:tddold,项目名称:ASP.NET-MVC-Projects,代码行数:7,代码来源:JokesService.cs

示例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;
        }
开发者ID:NikolayIT,项目名称:GameAITesterOnline,代码行数:27,代码来源:BattlesGenerator.cs

示例8: StoryService

 public StoryService(
     IDbRepository<Story> storyRepository,
     IDbRepository<Genre> genreRepository)
 {
     this.storyRepository = storyRepository;
     this.genreRepository = genreRepository;
 }
开发者ID:newmast,项目名称:Steep,代码行数:7,代码来源:StoryService.cs

示例9: ProductsController

        public ProductsController(IDbRepository<Product> products, IDbRepository<Category> categories)
        {
            this.products = products;
            this.categories = categories;

            ViewData["ActiveMenuName"] = "Products";
        }
开发者ID:ahmedmatem,项目名称:ludogoriefood,代码行数:7,代码来源:ProductsController.cs

示例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;
 }
开发者ID:simeonpp,项目名称:Trip-Destination,代码行数:7,代码来源:TripServices.cs

示例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;
 }
开发者ID:Vyara,项目名称:SciHub,代码行数:8,代码来源:MoviesService.cs

示例12: AuctionController

 public AuctionController(IDbRepository<Auction> auctions,
     IDbRepository<Item> items,
     IAuctionService auctionService)
 {
     this.dataAuction = auctions;
     this.dataItem = items;
     this.auctionService = auctionService;
 }
开发者ID:MarinMarinov,项目名称:ASP.NET-MVC-Graduation-Project,代码行数:8,代码来源:AuctionController.cs

示例13: OrganizationsService

 public OrganizationsService(
     IDbRepository<Organization> organizations,
     IDbRepository<User> users,
     IOrganizationImagesService organizationImages)
 {
     this.organizations = organizations;
     this.users = users;
     this.organizationImages = organizationImages;
 }
开发者ID:ni4ka7a,项目名称:GoDrive,代码行数:9,代码来源:OrganizationsService.cs

示例14: StatisticsService

 public StatisticsService(
     IDbRepository<Story> storyRepository,
     IDbRepository<Chapter> chapterRepository,
     IDbRepository<Genre> genreRepository)
 {
     this.storyRepository = storyRepository;
     this.chapterRepository = chapterRepository;
     this.genreRepository = genreRepository;
 }
开发者ID:newmast,项目名称:Steep,代码行数:9,代码来源:StatisticsService.cs

示例15: WishListController

 public WishListController(
       IProductService products,
       IDbRepository<Wishlist> wishLists,
       IService<Product> productsService)
 {
     this.productsService = productsService;
     this.products = products;
     this.wishLists = wishLists;
 }
开发者ID:tddold,项目名称:MVC-Project,代码行数:9,代码来源:WishListController.cs


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