public IQueryable <TEntity> GetAll()
 {
     try
     {
         return(_applicantContext.Set <TEntity>());
     }
     catch (Exception)
     {
         throw new Exception("Couldn't retrieve entities");
     }
 }
Beispiel #2
0
 /// <summary>
 /// Get all applicant
 /// </summary>
 /// <returns>Returns list of given entity</returns>
 public IQueryable <TEntity> GetAll()
 {
     try
     {
         return(_applicantContext.Set <TEntity>());
     }
     catch (Exception exception)
     {
         _logger.LogError(exception.Message);
         throw new HahnException("Couldn't retrieve records");
     }
 }
 // GET: Elections/Create
 public IActionResult Create()
 {
     ViewData["ApplicantId"] = new SelectList(_context.Applicant, "Id", "Id");
     ViewData["ElectorId"]   = new SelectList(_context.Set <Elector>(), "Id", "Id");
     return(View());
 }