public EventService(EventRepository eventRepo, AttractionRepository attractionRepo, UserRepository userRepo, CommentRepository commentRepo) { _eventRepo = eventRepo; _attractionRepo = attractionRepo; _userRepo = userRepo; _commentRepo = commentRepo; }
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); }
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(); } }
public UnitOfWork(DataContext context) { _context = context; City = new CityRepository(_context); Attraction = new AttractionRepository(_context); }
public AttractionService(EventRepository eventRepo, AttractionRepository attractionRepo, InfoRepository infoRepo) { _eventRepo = eventRepo; _attractionRepo = attractionRepo; _infoRepo = infoRepo; }
public CommentService(CommentRepository commentRepo, EventRepository eventRepo, AttractionRepository attractionRepo) { _commentRepo = commentRepo; _eventRepo = eventRepo; _attractionRepo = attractionRepo; }
public AttractionsController(AttractionRepository attractionRepository) { _attractionRepository = attractionRepository; }
public AttractionService(AttractionRepository repo) { this.repo = repo; }