Esempio n. 1
0
        public void RemoveNinja()
        {
            var ninja = _ninjaRepository.GetAll().First(o => o.Name == SelectedNinja.Name);

            if (_ninjaRepository.Delete(ninja))
            {
                NinjaCollection.Remove(NinjaCollection.First(o => o.Id == SelectedNinja.Id));
            }

            UpdateCollection();
        }
Esempio n. 2
0
        public IActionResult Index()
        {
            var ninjas = _repo.GetAll();

            return(View(ninjas.Select(n => new NinjaIndexViewModel(n))));
        }