예제 #1
0
        public ActionResult Specials()
        {
            List <Special> specials = new List <Special> {
                new Special
                {
                    Id      = 1,
                    Title   = "Special Deal 1",
                    Details = "TESTTESTTESTESTESTESTESTESTESTESTESTESTESTTESTTESTTESTESTESTESTESTESTESTESTESTESTEST"
                },
                new Special
                {
                    Id      = 2,
                    Title   = "Special Deal 2",
                    Details = "TESTTESTTESTESTESTESTESTESTESTESTESTESTESTTESTTESTTESTESTESTESTESTESTESTESTESTESTEST"
                }
            };

            AdminSpecialsViewModel vm = new AdminSpecialsViewModel(specials);

            return(View(vm));
        }
예제 #2
0
 public ActionResult CreateSpecial(AdminSpecialsViewModel special)
 {
     //method to add special to table of current specials in the db here
     return(RedirectToAction("Specials"));
 }