Ejemplo n.º 1
0
 public IActionResult ShowEdit(Show show)
 {
     showRepo.Edit(show);
     ViewData["Message"]  = "Show Updated!";
     ViewBag.ListOfVenues = venueRepo.GetAllVenues();
     ViewBag.ListOfTypes  = showRepo.GetAllShowTypes();
     return(View("ShowEdit", show));
 }
Ejemplo n.º 2
0
        public async Task EditTest()
        {
            Show value = await _repository.Get(TestSample.Get <Show>().Slug);

            value.Path  = "/super";
            value.Title = "New Title";
            Show edited = await _repository.Edit(value, false);

            KAssert.DeepEqual(value, edited);

            await using DatabaseContext database = Repositories.Context.New();
            Show show = await database.Shows.FirstAsync();

            KAssert.DeepEqual(show, value);
        }