ASP.NET MVC 13

Sunday, November 10, 2013

Get insight into what entity framework and mvc framework are doing, install nuget package glimpse mvc4 and ef6


Glimpse and ef api don't mix return books controller index action to being a non async method


Launch application, goto glimpse.axd, special handler installed and turn glimpse on


Navigate to home page and get request and server information in the bottom panel


Click on g in bottom right corner and a popup window pops out with all sorts of interesting information: configuration, environment, request, routes, timeline view


Click on books link and glimpse sql tab, see what queries where executed and how long they took


Moving schemas: add this code to booksdb


Add this code to identitydb to change the schema


Build and run the application, exception thrown since model out of sync with the database


Run these 2 addmigrations to generate scripts to update the schema


Execute these 2 update database command to apply the changes


Refresh the database in server explorer and view the new schemas applied to the tables


Create new asp.net project using mvc template and windows authentication named signalr


Install nuget package signalr


Add class startup.cs at the root of the application with this code to map signalr


Create folder hubs and add this signalr class


Code of the hub class


Install package knockout.js


Build and run the application, login with windows credentials


And logged into the app

Default Success Warning Important Info Inverse
B S W I ? O