This demo project shows some countries, their cities and temperature. The temperature is created by inserting some random numbers between 253 to 334 K.
MVC| Webapi | ADO.net | MSSQL| basic three-tier architecture | Angularjs 1 | Bootstrap | Newtonsoft
Angularjs skills includes controller, directive, filter and service.
No dependency injection. No server or client-side model validation
- MvcController => CityController
- ApiController => CitiesController
- In App_Data folder add database WorldWeather.mdf
- In Server Explorer, right click New Query and run the script GuanghuiWeather.sql
- Modify connection string in web.config, no Initial Catalog but replace Directory.
<add name="connstr" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|Directory|\Guanghui.Weather.Webapp\App_Data\WorldWeather.mdf;Integrated Security=True" />
- Set Guanghui.Weather.Webapp as startup project
- Restore nuget packages
- Run the project and review localhost/Country/Index