public void ReturnsAllValues() { var repository = new ValuesRepository(); var values = repository.GetAll(); Assert.AreEqual(2, values.Count()); }
public async Task <IActionResult> GetValues() { try { return(Ok(await _vr.GetAll())); } catch (Exception e) { return(BadRequest(e.Message)); } }
//public ActionResult<IEnumerable<string>> Get() //{ // return new string[] { "value1", "value2" }; //} public async Task <ActionResult <IEnumerable <Value> > > Get() { return(await _repository.GetAll()); }
public async Task <List <Value> > Get() { return(await _repository.GetAll()); }
public ActionResult <IEnumerable <string> > Get() { return(Ok(_repository.GetAll())); }
public async Task <List <Student> > Get() { return(await _repository.GetAll()); }