Example #1
0
        public async Task <Exhibit> NewExhibit(Exhibit toAdd, Guid museumId)
        {
            Museum museum = await _museumRepository.Get(museumId);

            Exhibit createdExhibit = await museum.AddExhibit(toAdd);

            return(createdExhibit);
        }
        public MuseumModel Execute(string userId)
        {
            var user = userManager.FindByIdAsync(userId).Result;

            var museum = museumRepository.Get(user.MuseumId);

            var museumModel = new MuseumModel
            {
                Id          = museum.Id,
                Name        = museum.Name,
                ShortName   = museum.ShortName,
                Address1    = museum.Address1,
                Address2    = museum.Address2,
                City        = museum.City,
                State       = museum.State,
                ZipCode     = museum.ZipCode,
                CountryId   = museum.Country.Id,
                RecordCount = museum.RecordCount
            };

            return(museumModel);
        }
Example #3
0
 public Museum GetMuseum(int id)
 {
     return(museumRepository.Get(id));
 }