public IActionResult AddNewCharacter() { ISpecializationCollection specializationCollection = _specializationFactory.SpecializationCollection(); AddCharacterViewModel model = new AddCharacterViewModel() { AllSpecializations = specializationCollection.GetAll() }; return(View(model)); }
public IActionResult Edit(int id) { Character character = _characterFactory.CharacterCollection().GetById(id); ISpecializationCollection specializationCollection = _specializationFactory.SpecializationCollection(); ShowAllCharactersViewModel model = new ShowAllCharactersViewModel() { CharacterId = id, Name = character.Name, SpecializationName = character.SpecializationName, AllSpecializations = specializationCollection.GetAll() }; return(View(model)); }