Exemplo n.º 1
0
 private PesanModel PreparePublisher(PesanModel model)
 {
     model.tMejas = context.tMejas.AsQueryable<tMeja>().Select(x =>
     new SelectListItem()
     {
         Text = x.IdMeja,
         Value = x.IdMeja.ToString()
     });
     return model;
 }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            PesanModel model = new PesanModel();
            PreparePublisher(model);

            List<PesanModel> menuList = new List<PesanModel>();
            var query = from menu in context.tMenus
                        select new PesanModel
                        {
                            IdMenu = menu.IdMenu,
                            Nama = menu.Nama,
                            Images = menu.Images
                        };
            menuList = query.ToList();
            return View(menuList);
        }
Exemplo n.º 3
0
 public ActionResult Create()
 {
     PesanModel model = new PesanModel();
     PreparePublisher(model);
     return View(model);
 }