Esempio n. 1
0
        public async Task <IActionResult> GetCounters()
        {
            var result = await _counterService.GetCounters();

            if (result != null)
            {
                return(Ok(new ListResponseModel {
                    Items = result, Message = MessageConstants.RetrievalSuccess, TotalRecords = result.Count
                }));
            }
            return(BadRequest(MessageConstants.SomethingWentWrong));
        }
Esempio n. 2
0
 public ActionResult <IEnumerable <CounterVM> > GetCounters()
 {
     return(Ok(_counterService.GetCounters()));
 }