本文整理汇总了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;未经允许,请勿转载。 |
请发表评论