// GET: InstrumentController/Create
        public ActionResult Create()
        {
            InstrumentFormViewModel vm = new InstrumentFormViewModel()
            {
                Instrument   = new Instrument(),
                Difficulties = _difficultyRepository.GetAll()
            };

            return(View(vm));
        }
 public IList <DifficultyModel> GetAll()
 {
     return(repository.GetAll().Select(x => new DifficultyModel(x)).ToList());
 }
Exemple #3
0
 public IActionResult Get()
 {
     return(Ok(_difficultyRepository.GetAll()));
 }