Exemplo n.º 1
0
 public MenuItemBLL(MenuItem menuItemDAL)
 {
     MenuItemID = menuItemDAL.MenuItemID;
     RestaurantID = menuItemDAL.RestaurantID;
     Name = menuItemDAL.Name;
     Description = menuItemDAL.Description;
     Price = menuItemDAL.Price;
     ImgUrl = menuItemDAL.ImgUrl;
 }
Exemplo n.º 2
0
        public void AddMenuItem(int restaurantID, String name, String description, Decimal price)
        {
            MenuItem menuItem = new MenuItem();
            menuItem.Name = name;
            menuItem.Description = description;
            menuItem.Price = price;
            menuItem.RestaurantID = restaurantID;

            _context.MenuItems.Add(menuItem);
            _context.SaveChanges();
        }