public IHttpActionResult GetRoster(int museum) { MuseumServices museumServices = CreateMuseumService(); var employees = museumServices.GetEmployeesAtMuseum(museum); return(Ok(employees)); }
public IHttpActionResult GetCollection(int museum) { MuseumServices museumServices = CreateMuseumService(); var artworks = museumServices.GetArtworksAtMuseum(museum); return(Ok(artworks)); }
public IHttpActionResult Get(string name) { MuseumServices museumServices = CreateMuseumService(); var museum = museumServices.GetMuseumByName(name); return(Ok(museum)); }
public IHttpActionResult Get(int id) { MuseumServices museumServices = CreateMuseumService(); var museum = museumServices.GetMuseumById(id); return(Ok(museum)); }
[HttpGet]//Get all museums public IHttpActionResult GetAll() { MuseumServices museumServices = CreateMuseumService(); var museums = museumServices.GetMuseums(); return(Ok(museums)); }
private MuseumServices CreateMuseumService() { var userId = Guid.Parse(User.Identity.GetUserId()); var museumService = new MuseumServices(userId); return(museumService); }