public AdventurerService CreateAdventurerService()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new AdventurerService(userId);

            return(service);
        }
        public ActionResult Index()
        {
            var userId  = Guid.Parse(User.Identity.GetUserId());
            var service = new AdventurerService(userId);
            var model   = service.GetAdventurers();

            return(View(model));
        }
Ejemplo n.º 3
0
 public AdventurersController(ApplicationDbContext context)
 {
     _context          = context;
     adventurerService = new AdventurerService(_context);
 }