public async Task<ActionResult> IndexAsync()
        {
            ViewBag.SyncOrAsync = "Asynchronous";

            string connection = "mongodb://localhost:27017"; ;
            var repository = new DAL.AlertingRepository(connection);
            return View("Index", await repository.GetAlertTypesAsync());
        }
 private IEnumerable<Models.AlertType> GetAlertTypes()
 {
     string connection = "mongodb://localhost:27017"; ;
     IEnumerable<Models.AlertType> list = new DAL.AlertingRepository(connection).GetAlertTypes();
     return list;
 }