public async Task GetList_ReadAllRecords_RecordsFound() { using (SqlXRepository repository = new SqlXRepository(_connectionString)) { var items = (await repository.GetListAsync()).ToList(); Assert.IsTrue(items.Count > 0); } }
// GET: X public async Task <ActionResult> Index() { ViewBag.Message = TempData["Message"]; TempData["Message"] = string.Empty; using (SqlXRepository repository = new SqlXRepository()) { var items = (await repository.GetListAsync()).ToList(); return(View(items)); } }