public IActionResult Readers()
        {
            var readers = new List <Reader>()
            {
                new Reader()
                {
                    Name = "Alex Barker", Id = 1
                },
                new Reader()
                {
                    Name = "Nicole Foster", Id = 2
                },
                new Reader()
                {
                    Name = "Euler", Id = 3
                },
                new Reader()
                {
                    Name = "Cauchy", Id = 4
                }
            };

            var readersVm = new ReadersViewModel()
            {
                Readers = readers
            };

            return(View("Readers", readersVm));
        }
        public IActionResult Index()
        {
            // Summary
            //
            // Display all readers

            var vm = new ReadersViewModel()
            {
                Readers = DatabaseHelper.GetReaders().ToList()
            };

            return(View(vm));
        }
Exemple #3
0
 public Readers()
 {
     InitializeComponent();
     DataContext = new ReadersViewModel();
 }