예제 #1
0
        // GET: api/Lookup
        public IEnumerable <Lookup> Get()
        {
            Log.Debug("get called!");
            var lookups = _lookupService.GetAll()
                          .OrderBy(x => x.Codeid)
                          .ThenBy(x => x.Rank);

            return(lookups.ToList());
        }
예제 #2
0
        public void should_GetAll()
        {
            Assert.That(_testLookups, Is.Not.Empty);
            List <int> ids     = _testLookups.Select(x => x.Id).ToList();
            var        lookups = _lookupService.GetAll().Where(x => ids.Contains(x.Id));

            Assert.That(lookups, Is.Not.Empty);
            foreach (var lookup in lookups)
            {
                Debug.Print(lookup.ToString());
            }
        }
        public async Task <IActionResult> GetAllLookupValues([FromRoute] string param,
                                                             CancellationToken token = default)
        {
            try
            {
                var serviceResponse = await _lookupService.GetAll(param, token);

                return(new OkObjectResult(Mapper.Map <IEnumerable <LookupResponseDto> >(serviceResponse)));
            }
            catch (Exception ex)
            {
                return(new NotFoundResult());
            }
        }
예제 #4
0
        public ActionResult GetLookup()
        {
            var output = _lookupService.GetAll();

            return(Ok(output));
        }
예제 #5
0
 public ActionResult Get()
 {
     return(GetStatusCodeResult(_categoriesManager.GetAll()));
 }
예제 #6
0
 public async Task <IActionResult> GetAll()
 {
     return(Ok(await _lookupService.GetAll()));
 }
예제 #7
0
 public async Task <LookupOutput> GetLookups()
 {
     return(await _lookupService.GetAll());
 }
        public ActionResult Index()
        {
            var items = _Service.GetAll();

            return(View(items));
        }
예제 #9
0
 public ActionResult <ResultMessage> Get()
 {
     return(GetStatusCodeResult(_Manager.GetAll()));
 }