Controllers/HeadBodyController.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using WebApplication1.Models;

namespace WebApplication1.Controllers
{
    public class HeadBodyController : Controller
    {
        [HttpGet]
        public ActionResult Index()
        {
            Entry entry = new Entry();
            entry.Head = GetHead();

            entry.List = GetList();
            return View(entry);
        }

        EntryHead GetHead()
        {
            return new EntryHead()
            {
                HeadId = "HeadId1",
                HeadName = "HeadName2"
            };
        }

        List<EntryList> GetList()
        {
            List<EntryList> list = new List<EntryList>();
            EntryList list1 = new EntryList()
            {
                ListId = "ListId33",
                ListName = "ListName33"
            };

            EntryList list2 = new EntryList()
            {
                ListId = "ListId44",
                ListName = "ListName44"
            };
            list.Add(list1);
            list.Add(list2);

            return list;
        }

        [HttpPost]
        public ActionResult Index(Entry model)
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

后面还有 12 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。