public async Task <List <CategoryDto> > GetCategoriesByRound(int roundId) { try { var SelectedCats = await _context.Set <GetValidCategoriesByRoundResult>().FromSqlRaw($"GetValidCategoriesByRound {roundId}").ToListAsync(); return(_mapper.Map <List <CategoryDto> >(SelectedCats)); } catch (Exception ex) { throw ex; } }
/****************************************************************** * Sets the Entity Framework database context and table references * ***************************************************************/ public BaseRepo(JeopardyContext context) { _db = context; _table = _db.Set <T>(); }