Exemple #1
0
        public void ReturnsAllValues()
        {
            var repository = new ValuesRepository();

            var values = repository.GetAll();

            Assert.AreEqual(2, values.Count());
        }
Exemple #2
0
 public async Task <IActionResult> GetValues()
 {
     try
     {
         return(Ok(await _vr.GetAll()));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemple #3
0
        //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());
 }
Exemple #5
0
 public ActionResult <IEnumerable <string> > Get()
 {
     return(Ok(_repository.GetAll()));
 }
 public async Task <List <Student> > Get()
 {
     return(await _repository.GetAll());
 }