Exemplo n.º 1
0
        public IHttpActionResult GetRoster(int museum)
        {
            MuseumServices museumServices = CreateMuseumService();
            var            employees      = museumServices.GetEmployeesAtMuseum(museum);

            return(Ok(employees));
        }
Exemplo n.º 2
0
        public IHttpActionResult GetCollection(int museum)
        {
            MuseumServices museumServices = CreateMuseumService();
            var            artworks       = museumServices.GetArtworksAtMuseum(museum);

            return(Ok(artworks));
        }
Exemplo n.º 3
0
        public IHttpActionResult Get(string name)
        {
            MuseumServices museumServices = CreateMuseumService();
            var            museum         = museumServices.GetMuseumByName(name);

            return(Ok(museum));
        }
Exemplo n.º 4
0
        public IHttpActionResult Get(int id)
        {
            MuseumServices museumServices = CreateMuseumService();
            var            museum         = museumServices.GetMuseumById(id);

            return(Ok(museum));
        }
Exemplo n.º 5
0
        [HttpGet]//Get all museums
        public IHttpActionResult GetAll()
        {
            MuseumServices museumServices = CreateMuseumService();
            var            museums        = museumServices.GetMuseums();

            return(Ok(museums));
        }
Exemplo n.º 6
0
        private MuseumServices CreateMuseumService()
        {
            var userId        = Guid.Parse(User.Identity.GetUserId());
            var museumService = new MuseumServices(userId);

            return(museumService);
        }