Ejemplo n.º 1
0
        public async Task <IActionResult> GetAll()
        {
            var result = await _services.GetAllAsync();

            if (result.IsValid)
            {
                return(Ok(result.Result));
            }
            return(BadRequest(result.ErrorsList));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var result = await _services.GetAllAsync();

            if (result.IsValid)
            {
                return(View(result.Result));
            }
            TempData["ErrorsList"] = result.ErrorsList;
            return(View());
        }
        public async Task <IActionResult> Index()
        {
            var result = await _services.GetAllAsync();

            return(View(result.Result));
        }
 // GET: Awards
 public async Task <IActionResult> Index()
 {
     return(View(await _awardService.GetAllAsync()));
 }
Ejemplo n.º 5
0
        public async Task <SelectList> GetAward(string hashIdSelectedValue = null)
        {
            var award = await _awardService.GetAllAsync();

            return(award.IsValid ? new SelectList(award.Result, "HashId", "Name", hashIdSelectedValue) : null);
        }
 public async Task <IActionResult> GetAll()
 {
     return(Ok(await _services.GetAllAsync()));
 }
 // GET: Goals/Create
 public async Task <IActionResult> Create()
 {
     // ViewData["AwardId"] = new SelectList(_context.Award, "Id", "Name");
     ViewData["AwardId"] = new SelectList(await _awardService.GetAllAsync(), "Id", "Name");
     return(View());
 }