Пример #1
0
        public async Task <ActionResult <InstrumentModel[]> > Get()
        {
            try
            {
                var results = await _repository.GetAllInstrumentsAsync();

                return(_mapper.Map <InstrumentModel[]>(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure"));
            }
        }