コード例 #1
0
        public ViewResult Index()
        {
            SimplePilot Sp    = new SimplePilot(_context);
            var         model = Sp.GetAllPilots();

            return(View(model));
        }
コード例 #2
0
        public ViewResult Index(string name)
        {
            SimplePilot            Sp    = new SimplePilot(_context);
            IEnumerable <PilotDto> model = null;

            if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(name))
            {
                model = Sp.GetAllPilots();
            }
            else
            {
                model = Sp.GetPilotByName(name);
            }
            return(View(model));
        }