コード例 #1
0
ファイル: EventService.cs プロジェクト: gegex08/Man-E-Fest
 public EventService(EventRepository eventRepo, AttractionRepository attractionRepo, UserRepository userRepo, CommentRepository commentRepo)
 {
     _eventRepo      = eventRepo;
     _attractionRepo = attractionRepo;
     _userRepo       = userRepo;
     _commentRepo    = commentRepo;
 }
コード例 #2
0
ファイル: UnitOfWork.cs プロジェクト: nuyonu/LocationMaster
 public UnitOfWork(LocationMasterContext context)
 {
     _context   = context;
     Locations  = new LocationsRepository(_context);
     Users      = new UserRepository(_context);
     Attraction = new AttractionRepository(_context);
     Ticket     = new BuyedTicketRepository(_context);
     Category   = new CategoryRepository(_context);
     Photo      = new PhotoRepository(_context);
     Review     = new ReviewRepository(_context);
 }
コード例 #3
0
        static void Main(string[] args)
        {
            using (FileStream stream = new FileStream("map.json", FileMode.Open, FileAccess.Read))
            {
                var jsonSerializer = new DataContractJsonSerializer(typeof(IEnumerable <Attraction>));
                var attractions    = (IEnumerable <Attraction>)jsonSerializer.ReadObject(stream);

                var repo = new AttractionRepository();
                repo.InsertAttractions(attractions).Wait();
            }
        }
コード例 #4
0
 public UnitOfWork(DataContext context)
 {
     _context   = context;
     City       = new CityRepository(_context);
     Attraction = new AttractionRepository(_context);
 }
コード例 #5
0
 public AttractionService(EventRepository eventRepo, AttractionRepository attractionRepo, InfoRepository infoRepo)
 {
     _eventRepo      = eventRepo;
     _attractionRepo = attractionRepo;
     _infoRepo       = infoRepo;
 }
コード例 #6
0
ファイル: CommentService.cs プロジェクト: gegex08/Man-E-Fest
 public CommentService(CommentRepository commentRepo, EventRepository eventRepo, AttractionRepository attractionRepo)
 {
     _commentRepo    = commentRepo;
     _eventRepo      = eventRepo;
     _attractionRepo = attractionRepo;
 }
コード例 #7
0
 public AttractionsController(AttractionRepository attractionRepository)
 {
     _attractionRepository = attractionRepository;
 }
コード例 #8
0
 public AttractionService(AttractionRepository repo)
 {
     this.repo = repo;
 }