Ejemplo n.º 1
0
        public IActionResult ViewName(NameModel obj1)
        {
            var model = new List <NameModel>();

            model.Add(obj1);
            return(PartialView("_Tab2PartialView", model));
        }
Ejemplo n.º 2
0
        public IActionResult Index()
        {
            string referer = Request.Headers["Referer"].ToString();
            var    exceptionHandlerPathFeature =
                HttpContext.Features.Get <IExceptionHandlerPathFeature>();

            if (exceptionHandlerPathFeature?.Path == "/index")
            {
            }
            //var ress = _context.Student.Include(s => s.Grades).ToList();
            //return RedirectToAction("Index", "Default", new { area = "Dashboard" });
            //var dbContext = DbContextFactory.Create("DB2");
            //var movies = dbContext.Movie.ToList();
            string returnUrl = null;

            returnUrl ??= Url.Content("~/Account/feeds");
            var TotalWorkingHours = _context.Student.ToList().Count > 0 ? _context.Student.ToList().Sum(a => Int64.Parse(a.Name)) : 0;
            var res = _context.Student.Include(s => s.Grades).ThenInclude(g => g.Subject).ToList();

            string pathPortada = Path.Combine(_hostingEnvironment.WebRootPath);
            var    NameModel   = new NameModel();

            NameModel.Name = Path.Combine(pathPortada, "thieve.png");
            return(View(NameModel));
        }
Ejemplo n.º 3
0
        public IActionResult ViewName()
        {
            NameModel obj = new NameModel();

            return(View("ViewName", obj));
        }