Example #1
0
        public void GetAllClientsTest()
        {
            var clients = _clientsService.GetAllAsync().Result;

            Assert.IsNotNull(clients);
            Assert.AreEqual(clients.Count, _clients.ToList().Count);
        }
 public IHttpActionResult GetAll()
 {
     try
     {
         return(Ok(_clientService.GetAllAsync().Result));
     }
     catch (Exception ex)
     {
         return(InternalServerError(ex));
     }
 }
Example #3
0
 /// <summary>
 /// Get a list of items
 /// </summary>
 /// <returns>List with TodoModels</returns>
 public virtual async Task <IEnumerable <ClientsModel> > GetAllClients()
 {
     return(await _clientService.GetAllAsync());
 }
Example #4
0
        public async Task <IActionResult> GetAll()
        {
            var models = await _clientsService.GetAllAsync();

            return(Ok(models));
        }