public async Task <Market> GetByIdAsync(long id) { var item = await _repository.FindAsync(id); if (item == null) { throw new NotFoundException(ErrorCode.MarketNotFount); } return(item); }