Code Monkey home page Code Monkey logo

ksmuthuus / nationalcookies Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bmaluijb/nationalcookies

0.0 0.0 0.0 774 KB

Welcome to the GitHub repository of the nationalcookies application. This app is the demo app for the Pluralsight course: Microsoft Azure Developer: Implementing Azure Cache. You can download a copy and follow along in the course.

Home Page: https://app.pluralsight.com/library/courses/microsoft-azure-cache-implementing/

C# 6.28% ASP 1.36% CSS 0.37% JavaScript 89.12% TSQL 0.11% HTML 2.76%

nationalcookies's Introduction

NationalCookies

enter image description here

Hi!

Welcome to the GitHub repository of the nationalcookies application. This app is the demo app for the Pluralsight course Microsoft Azure Developer: Implementing Azure Cache.

You can download a copy of the code and follow along in the course.

You can see the end result running live here: https://www.nationalcookies.nl/

The solution consists of:

  • NationalCookies.MVC
    • This is the website for the Nationalcookies cookie store
    • Technology: ASP.NET Core MVC 2.1
  • NationalCookies.Forms
    • This is the website for the Nationalcookies cookie store ,based on ASP.NET Forms
    • Technology: ASP.NET Forms 4.7
  • NationalCookies.Database
    • This contains the database schema and seed script
    • Technology: Visual Studio Database project
  • NationalCookies.Data
    • This is a class library that contains classes to connect to the database and work with cookies and orders
    • Technology:
      • Class library (.NET Standard 2.0)
      • Entity Framework Core 2.1

This is a very simple solution that consists out of a website (either NationalCookies.MVC or NationalCookies.Forms) that connects to a database and later on in the course, also connects to Azure Redis Cache:

Image of Nationalcookies solution

Follow the steps below to get this code working:

Step 1: Create a database

The website needs a database to get information about cookies and read and write order information. The database that we are using is a SQL Server database. This can be one that you install locally or an Azure SQL database that you run in Azure.

In any case, make sure that you have a SQL Server running that you can access.

Step 2: Change the connection strings

In order for the website to connect to the database, we need to enter the connection string to the database. We do that in these two places:

  • NationalCookies.MVC / appsettings.json
    • Fill in the CookieDBConnection setting with the value of the connectionstring to your SQL Server
  • NationalCookies.Forms / Web.config
    • Fill in the CookieDBConnection setting with the value of the connectionstring to your SQL Server

Step 3: Deploy the database schema and seed script

Now that we have a database and that we website can connect to it, we need to make sure that there are tables and data in the database.

You can do that with the NationalCookies.Database project:

  1. In Visual Studio, you can right-click on the NationalCookies.Database project and click Publish. The screen in the image below opens:

Image of Nationalcookies solution

  1. Click the Edit button to set the connection to your SQL Server database
  2. Click Publish

That's it! Now, you can run either the NationalCookies.MVC or NationalCookies.Forms project and follow along with the course.

Thanks for watching and let me know if you have any questions!

nationalcookies's People

Contributors

bmaluijb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.