Пример #1
0
        public async Task <IActionResult> DeletePlaythrough(PlaythroughDeleteViewModel playthroughDetailsViewModel)
        {
            await playDataViewService.DeletePlaythroughAsync(playthroughDetailsViewModel);

            // TODO: If the data couldn't be deleted, show error message in related PlayData page

            return(RedirectToAction(nameof(Details), new { id = playthroughDetailsViewModel.PlayDataID }));
        }
Пример #2
0
        internal static PlaythroughDeleteViewModel ToDeleteViewModel(Playthrough playthrough)
        {
            var playthroughDeleteViewModel = new PlaythroughDeleteViewModel
            {
                PlayDataID    = playthrough.PlayDataID,
                OrdinalNumber = playthrough.OrdinalNumber
            };

            return(playthroughDeleteViewModel);
        }
Пример #3
0
 public async Task DeletePlaythroughAsync(PlaythroughDeleteViewModel playthroughDeleteViewModel)
 {
     await playthroughDbService.DeleteAsync(playthroughDeleteViewModel.PlayDataID, playthroughDeleteViewModel.OrdinalNumber);
 }