• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDbRepository类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



IDbRepository类属于命名空间,在下文中一共展示了IDbRepository类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: RoomsService

 public RoomsService(
     IDbRepository<BookedRoom> booked,
     IDbRepository<Room> rooms,
     IDbRepository<Reservation> reservations)
 {
     this.bookedRooms = booked;
     this.rooms = rooms;
     this.reservations = reservations;
 }
开发者ID:kiko81,项目名称:TABS,代码行数:9,代码来源:RoomsService.cs


示例17: ShoppingCartController

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


示例18: AuditTrailQueryService

        public AuditTrailQueryService(IDbRepository repository)
        {
            if (repository == null)
            {
                throw new ArgumentException("repository");
            }

            this.repository = repository;
        }
开发者ID:affecto,项目名称:dotnet-AuditTrail,代码行数:9,代码来源:AuditTrailQueryService.cs


示例19: RestartBattlesForTeam

        public void RestartBattlesForTeam(IDbRepository<Battle> battlesRepository, int teamId)
        {
            var battlesForTeam = battlesRepository.All().Where(x => x.FirstTeamId == teamId || x.SecondTeamId == teamId);
            foreach (var battle in battlesForTeam)
            {
                battle.IsFinished = false;
            }

            battlesRepository.Save();
        }
开发者ID:NikolayIT,项目名称:GameAITesterOnline,代码行数:10,代码来源:BattlesGenerator.cs


示例20: ShopController

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

            this.CalculateNumberOfProductsInCategories();

            ViewBag.Categories = this.categories.All().ToList();
            ViewBag.NumberOfProductsInCategories = this.numberOfProductsInCategories;
        }
开发者ID:ahmedmatem,项目名称:ludogoriefood,代码行数:10,代码来源:ShopController.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDbSession类代码示例发布时间:2022-05-24
下一篇:
C# IDbProvider类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap