Skip to content

Instantly share code, notes, and snippets.

@adaam2
Last active April 26, 2016 13:59
Show Gist options
  • Save adaam2/27608f8da3d276a85df3685895ba302b to your computer and use it in GitHub Desktop.
Save adaam2/27608f8da3d276a85df3685895ba302b to your computer and use it in GitHub Desktop.
MVC Practice.
Sample database connection string:
Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly;Pooling=False
Things to touch on (in order)
1. Any questions / things that confuse you before starting)
2. Class libraries (adding references)
3. Creating models, access modifiers, putting models into separate class library
4. Layout.cshtml + ViewStart.cshtml usage (a.] set lyout in top level viewstart, create viewstart file inside controller, set layout in view itself)
5. Controllers (scaffolding strongly typed models, different types of results, http verbs, post data, default parameters)
6. Strongly typed views vs dynamically typed views (+ viewbag)
7. Razor syntax.. loops, inline variables, if statements,
8. Views: Form helpers + other helpers (https://bitbucket.org/mbinteractiveltd/acco-online-payments/src/2cef3582f14112c498b98ac57ae502572fe0a42a/AccoOnlinePayments/Views/Payment/Index.cshtml?at=master&fileviewer=file-view-default)
9. BundleTransformer (+ SCSS package on nuget)
10. Dependency injection - constructor injection (maybe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment