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

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