public async Task <IActionResult> Create([Bind("ShoppingCartItemId,Amount,ShoppingCartId")] ShoppingCartItem shoppingCartItem)
        {
            if (ModelState.IsValid)
            {
                _context.Add(shoppingCartItem);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(shoppingCartItem));
        }
        public async Task <IActionResult> Create([Bind("CategoryId,CategoryName,Description")] Category category)
        {
            if (ModelState.IsValid)
            {
                _context.Add(category);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(category));
        }
示例#3
0
        public async Task <IActionResult> Create([Bind("Id,ZipCode,PostalAddress,PaymentCard,Cvv")] Order order)
        {
            if (ModelState.IsValid)
            {
                _context.Add(order);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(order));
        }
示例#4
0
        public async Task <IActionResult> Create([Bind("UserName,Age,Password")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
示例#5
0
        public async Task <IActionResult> Create([Bind("Name,RealAdress,Adress")] Store store)
        {
            if (ModelState.IsValid)
            {
                _context.Add(store);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(store));
        }
        public async Task <IActionResult> Create([Bind("DrinkId,Name,ShortDescription,LongDescription,Price,ImageUrl,ImageThumbnailUrl,IsPreferredDrink,InStock,CategoryId")] Drink drink)
        {
            if (ModelState.IsValid)
            {
                _context.Add(drink);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CategoryId"] = new SelectList(_context.Category, "CategoryId", "CategoryId", drink.CategoryId);
            return(View(drink));
        }
        public async Task <IActionResult> Create([Bind("OrderDetailId,DrinkId,OrderId,Amount,Price")] OrderDetail orderDetail)
        {
            if (ModelState.IsValid)
            {
                _context.Add(orderDetail);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["DrinkId"] = new SelectList(_context.Drink, "DrinkId", "DrinkId", orderDetail.DrinkId);
            ViewData["OrderId"] = new SelectList(_context.Order, "OrderId", "OrderId", orderDetail.OrderId);
            return(View(orderDetail));
        }
        public async Task <IActionResult> Create([Bind("UserName,Age,Password,Role")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                UserRole = user.Role;
                UserName = user.UserName;
                await _context.SaveChangesAsync();

                HttpContext.Session.SetString("UserName", user.UserName);
                HttpContext.Session.SetString("UserRole", user.Role);
                return(RedirectToAction("ThePreferredDrinks", "Drinks"));
            }
            return(View(user));
        }
示例#9
0
        public static void Main(string[] args)
        {
            var host = BuildWebHost(args);


            using (var scope = host.Services.CreateScope())
            {
                var services = scope.ServiceProvider;

                DrinkAndGoContext context = services.GetRequiredService <DrinkAndGoContext>();
                if (context.Category.Count() == 0)
                {
                    context.Add(new Category()
                    {
                        CategoryName = "Alcoholic",
                        Description  = "All the alcoholics drinks"
                    }); context.SaveChanges();
                    context.Add(new Category()
                    {
                        CategoryName = "NonAlcoholic",
                        Description  = "All the non alcoholics drinks"
                    }); context.SaveChanges();
                }
                if (context.Drink.Count() == 0)
                {
                    context.Add(new Drink()
                    {
                        Name              = "Beer",
                        Price             = 7.95M,
                        ShortDescription  = "The most widely consumed alcohol",
                        LongDescription   = "Beer is the world's oldest[1][2][3] and most widely consumed[4] alcoholic drink; it is the third most popular drink overall, after water and tea.[5] The production of beer is called brewing, which involves the fermentation of starches, mainly derived from cereal grains—most commonly malted barley, although wheat, maize (corn), and rice are widely used.[6] Most beer is flavoured with hops, which add bitterness and act as a natural preservative, though other flavourings such as herbs or fruit may occasionally be included. The fermentation process causes a natural carbonation effect, although this is often removed during processing, and replaced with forced carbonation.[7] Some of humanity's earliest known writings refer to the production and distribution of beer: the Code of Hammurabi included laws regulating beer and beer parlours.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRmOXntUk7I64iJPqOHbCYnliAtalV3a7QL6qn18tNzqnYtFdP9Fg",
                        InStock           = true,
                        IsPreferredDrink  = true,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRmOXntUk7I64iJPqOHbCYnliAtalV3a7QL6qn18tNzqnYtFdP9Fg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Rum & Coke",
                        Price             = 12.95M,
                        ShortDescription  = "Cocktail made of cola, lime and rum.",
                        LongDescription   = "The world's second most popular drink was born in a collision between the United States and Spain. It happened during the Spanish-American War at the turn of the century when Teddy Roosevelt, the Rough Riders, and Americans in large numbers arrived in Cuba. One afternoon, a group of off-duty soldiers from the U.S. Signal Corps were gathered in a bar in Old Havana. Fausto Rodriguez, a young messenger, later recalled that Captain Russell came in and ordered Bacardi (Gold) rum and Coca-Cola on ice with a wedge of lime. The captain drank the concoction with such pleasure that it sparked the interest of the soldiers around him. They had the bartender prepare a round of the captain's drink for them. The Bacardi rum and Coke was an instant hit. As it does to this day, the drink united the crowd in a spirit of fun and good fellowship. When they ordered another round, one soldier suggested that they toast ¡Por Cuba Libre! in celebration of the newly freed Cuba.",
                        CategoryId        = 1,
                        ImageUrl          = "https://res.cloudinary.com/saucey/image/upload/v1510708881/uzu0uqe7hcwb3iitdyj4.jpg",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://res.cloudinary.com/saucey/image/upload/v1510708881/uzu0uqe7hcwb3iitdyj4.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Tequila ",
                        Price             = 12.95M,
                        ShortDescription  = "Beverage made from the blue agave plant.",
                        LongDescription   = "Tequila (Spanish About this sound [teˈkila] (help·info)) is a regionally specific name for a distilled beverage made from the blue agave plant, primarily in the area surrounding the city of Tequila, 65 km (40 mi) northwest of Guadalajara, and in the highlands (Los Altos) of the central western Mexican state of Jalisco. Although tequila is similar to mezcal, modern tequila differs somewhat in the method of its production, in the use of only blue agave plants, as well as in its regional specificity. Tequila is commonly served neat in Mexico and as a shot with salt and lime across the rest of the world.The red volcanic soil in the surrounding region is particularly well suited to the growing of the blue agave, and more than 300 million of the plants are harvested there each year.[1] Agave tequila grows differently depending on the region. Blue agaves grown in the highlands Los Altos region are larger in size and sweeter in aroma and taste. Agaves harvested in the lowlands, on the other hand, have a more herbaceous fragrance and flavor.",
                        CategoryId        = 1,
                        ImageUrl          = "https://cdn.diffords.com/contrib/bws/2019/03/5c7e69c0cbf40.jpg",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://cdn.diffords.com/contrib/bws/2019/03/5c7e69c0cbf40.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Wine ",
                        Price             = 16.75M,
                        ShortDescription  = "A very elegant alcoholic drink",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://images-na.ssl-images-amazon.com/images/I/51r6IHn-%2BJL._SX425_.jpg",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://images-na.ssl-images-amazon.com/images/I/51r6IHn-%2BJL._SX425_.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Margarita",
                        Price             = 17.95M,
                        ShortDescription  = "A cocktail with sec, tequila and lime",
                        CategoryId        = 1,
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        ImageUrl          = "https://thecookful.com/wp-content/uploads/2015/08/Classic-Margarita-Rocks-DSC_2772-edit-feature-680.jpg",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://thecookful.com/wp-content/uploads/2015/08/Classic-Margarita-Rocks-DSC_2772-edit-feature-680.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Whiskey with Ice",
                        Price             = 15.95M,
                        ShortDescription  = "The best way to taste whiskey",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://ae01.alicdn.com/kf/HLB10O_QXZ_vK1Rjy0Foq6xIxVXaE/1-pc-Cooler.jpg_q50.jpg",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://ae01.alicdn.com/kf/HLB10O_QXZ_vK1Rjy0Foq6xIxVXaE/1-pc-Cooler.jpg_q50.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Jägermeister",
                        Price             = 15.95M,
                        ShortDescription  = "A German digestif made with 56 herbs",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://www.worldwidespirits.de/media/image/f4/8c/b3/39071_600x600.jpg",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://www.worldwidespirits.de/media/image/f4/8c/b3/39071_600x600.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Champagne",
                        Price             = 15.95M,
                        ShortDescription  = "That is how sparkling wine can be called",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://images-na.ssl-images-amazon.com/images/I/811SzCBbf0L._SX342_.jpg",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://images-na.ssl-images-amazon.com/images/I/811SzCBbf0L._SX342_.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Piña colada ",
                        Price             = 15.95M,
                        ShortDescription  = "A sweet cocktail made with rum.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSiUzFoWzjfw1UCTD26UzhQfcF4-rZLx1xqT6nL4uvsFevFOTp_",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSiUzFoWzjfw1UCTD26UzhQfcF4-rZLx1xqT6nL4uvsFevFOTp_"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "White Russian",
                        Price             = 15.95M,
                        ShortDescription  = "A cocktail made with vodka ",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd0E_jd163JsvOaiaAZ7YIFCygghOK-9Vyrx0qRDI4QWU2eDyy",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQd0E_jd163JsvOaiaAZ7YIFCygghOK-9Vyrx0qRDI4QWU2eDyy"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Long Island Iced Tea",
                        Price             = 15.95M,
                        ShortDescription  = "Aa mixed drink made with tequila.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyhfj0kjsWWJ_pT6s5E4Y5tgMAMMhynVNyZ2XSZDq8PRzkKXgpMg",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTyhfj0kjsWWJ_pT6s5E4Y5tgMAMMhynVNyZ2XSZDq8PRzkKXgpMg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Vodka",
                        Price             = 15.95M,
                        ShortDescription  = "A distilled beverage with water and ethanol.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://cdn2.bigcommerce.com/server5500/tpbc2s65/products/350/images/10626/ABSOLUT_VODKA_750ML__16867.1553621218.1280.1280.jpg?c=2",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://cdn2.bigcommerce.com/server5500/tpbc2s65/products/350/images/10626/ABSOLUT_VODKA_750ML__16867.1553621218.1280.1280.jpg?c=2"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Gin and tonic",
                        Price             = 15.95M,
                        ShortDescription  = "Made with gin and tonic water poured over ice.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdV2ybozuc83b7WZmKUQI6TdIAprnCKmv5eg2HeXCSqKPa5rhwWQ",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQdV2ybozuc83b7WZmKUQI6TdIAprnCKmv5eg2HeXCSqKPa5rhwWQ"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Cosmopolitan",
                        Price             = 15.95M,
                        ShortDescription  = "Made with vodka, triple sec, cranberry juice.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 1,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRGJiIKvrvbo1Wr93p3vY3neecynJWnxQcQrYRmK0Ov3CeI9qoz",
                        InStock           = false,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRGJiIKvrvbo1Wr93p3vY3neecynJWnxQcQrYRmK0Ov3CeI9qoz"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Tea ",
                        Price             = 12.95M,
                        ShortDescription  = "Made by leaves of the tea plant in hot water.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 2,
                        ImageUrl          = "https://images.hindi.news18.com/ibnkhabar/uploads/2018/05/teacup-2324842_960_720.jpg",
                        InStock           = true,
                        IsPreferredDrink  = true,
                        ImageThumbnailUrl = "https://images.hindi.news18.com/ibnkhabar/uploads/2018/05/teacup-2324842_960_720.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Water ",
                        Price             = 12.95M,
                        ShortDescription  = " It makes up more than half of your body weight ",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 2,
                        ImageUrl          = "https://www.madewithnestle.ca/sites/default/files/npl_en_710.png",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://www.madewithnestle.ca/sites/default/files/npl_en_710.png"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Coffee ",
                        Price             = 12.95M,
                        ShortDescription  = " A beverage prepared from coffee beans",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 2,
                        ImageUrl          = "https://a35iz1bymc-flywheel.netdna-ssl.com/wp-content/uploads/2014/12/Vienna-coffee-cover-400x266.jpg",
                        InStock           = true,
                        IsPreferredDrink  = true,
                        ImageThumbnailUrl = "https://a35iz1bymc-flywheel.netdna-ssl.com/wp-content/uploads/2014/12/Vienna-coffee-cover-400x266.jpg"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Kvass",
                        Price             = 12.95M,
                        ShortDescription  = "A very refreshing Russian beverage",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 2,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRFIDnMhSeoqqHIZ6FzIjJkz9Kem3J9_lUjMNzf5cRrQhygOUPVlw",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRFIDnMhSeoqqHIZ6FzIjJkz9Kem3J9_lUjMNzf5cRrQhygOUPVlw"
                    }); context.SaveChanges();
                    context.Add(new Drink()
                    {
                        Name              = "Juice ",
                        Price             = 12.95M,
                        ShortDescription  = "Naturally contained in fruit or vegetable tissue.",
                        LongDescription   = "Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of de Finibus Bonorum et Malorum (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, comes from a line in section 1.10.32. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from de Finibus Bonorum et Malorum by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.",
                        CategoryId        = 2,
                        ImageUrl          = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSWOgkyhpXwnFmuelx5dW7RtcuwvvDrRQ-WwHOGODm4JTJt_NI2uQ",
                        InStock           = true,
                        IsPreferredDrink  = false,
                        ImageThumbnailUrl = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSWOgkyhpXwnFmuelx5dW7RtcuwvvDrRQ-WwHOGODm4JTJt_NI2uQ"
                    });
                    context.SaveChanges();
                }

                if (context.User.Count() == 0)
                {
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Admin",
                        Age      = 20,
                        Cart     = new List <Cart_Drink>()
                    }); context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 30,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 30,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 20,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 23,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 40,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 60,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 60,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                    context.Add(new User()
                    {
                        UserName = "******",
                        Password = "******",
                        Role     = "Official",
                        Age      = 40,
                        Cart     = new List <Cart_Drink>()
                    });
                    context.SaveChanges();
                }
                if (context.Store.Count() == 0)
                {
                    context.Add(new Store()
                    {
                        Name       = "Jerusalem",
                        RealAdress = "King Gorg St.",
                        Adress     = "31.771959, 35.217018",
                    }); context.SaveChanges();
                    context.Add(new Store()
                    {
                        Name       = "Tel-Aviv",
                        RealAdress = "Dizingoph St.",
                        Adress     = "32.109333, 34.855499",
                    }); context.SaveChanges();
                    context.Add(new Store()
                    {
                        Name       = "Haifa",
                        RealAdress = "Hrzel St.",
                        Adress     = "32.794044, 34.989571",
                    }); context.SaveChanges();
                    context.Add(new Store()
                    {
                        Name       = "Herzelya",
                        RealAdress = "Shenkar St.",
                        Adress     = "32.166313, 34.843311",
                    }); context.SaveChanges();
                    context.Add(new Store()
                    {
                        Name       = "Karmiel",
                        RealAdress = "Yossef St.",
                        Adress     = "32.919945, 35.290146",
                    }); context.SaveChanges();
                }
            }

            host.Run();
        }