Classes that represent the data of the app and that use validation logic to enforce business rules for that data. Typically, model objects retrieve and store model state in a database.
Views are the components that display the app’s user interface (UI). Generally, this UI displays the model data.
Classes that handle browser requests, retrieve model data, and than specify view templates that return a response to the browser. In an MVC app, the view only displays information; the controller handles and responds to user input and interaction. For example, the controller handles route data and query-string values, and passes these values to the model. The model might use these values to query the database.
Git is a software that allows you to keep track of changes made to a project over time. Git works by recording the changes you made to a project, storing those changes, then allowing you to reference them as needed.
A Working Directory where you’ll be doing all the work creating, editing, deleting and organizing files.
A Staging Area where you’ll list changes you make to the working directory.
A Repository where Git permanently stores those changes as different versions of the project.
git init -- creates a new Git repository
git status -- inspects the contents of the working directory and staging area
git add -- adds files from the working directory to the staging area
git diff -- shows the difference between the working directory and the staging area
git commit -- permanently stores file changes from the staging area in the repository
git log -- shows a list of all previous commits
git checkout HEAD filename -- discards changes in the working directory
git reset HEAD filename -- unstages file changes in the staging area
git reset SHA -- can be used to reset to a previous commit in your commit history
git branch -- lists all a Git project’s branches
git branch branch_name -- creates a new branch
git checkout branch_name -- used to switch from one branch to another
git merge branch_name -- used to join file changes from one branch to another
git branch -d branch_name -- deletes the branch specified
git clone -- creates a local copy of a remote
git remote -v -- lists a Git project’s remotes
git fetch -- fetches work from the remote into the local copy
git merge origin/master -- merges origin/master into your local branch
git push origin branch_name -- pushes a local branch to the origin remote
5. The MvcSiteMapProvider renders a menu as a unordered list which doesn’t fit the Bootstrap’s Navbar component. We need to create a partial view to fill this gap. Add a partial view file BootstrapMenuHelperModel.cshtml under ~\Views\Shared\DisplayTemplates
Notes: 2 value-added features worth mention in the above code snippet. a) Handle multi-level site map using Bootstrap’s Dropdowns component (This post shows 2 levels site map, I tested with 4 levels site map); b) Support adding Separator in the menu (Refer to above ~\Mvc.sitemap snippet in step 4).
6. Edit the _Layout.cshtml file again to render the MvcSiteMap’s menu using the Bootstrap menu partial view.