Exemplo n.º 1
0
        public IActionResult Index()
        {
            var connection   = _configuration.GetConnectionString("ConnectionStrings");
            var urlPrincipal = _configuration.GetSection("AppSettings").GetValue <string>("UrlPrincipal");

            return(View(_serieService.GetAll()));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetAll()
        {
            try
            {
                var series = await service.GetAll();

                return(Ok(series));
            }
            catch (Exception)
            {
                return(NotFound());
            }
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Index(int?id)
        {
            TempData["Active"]       = "Dizi";
            ViewBag.SelectedCategory = RouteData.Values["id"];
            if (id == null)
            {
                var result = await _serieService.GetAll();

                return(View(result.Data));
            }
            else
            {
                var result = await _serieService.GetCategories((int)id);

                return(View(result.Data));
            }
        }
Exemplo n.º 4
0
 // GET: Serie
 public ActionResult Index()
 {
     return(View(Mapper.Map <ICollection <Serie>, ICollection <SerieModelView> >(_serieService.GetAll())));
 }