Hello and welcome to he start of the project! As I was saying in my hello world post I will be bogging about my experience in building a web app with ASP.NET 5, MVC 6 and Entity Framework 7.
Lets get to it then.
Fist thing I decided to do was set-up my source control. I’m going all-in with Azure on this project so I’ll be using Visual Studio Online for my source control needs. It’s free for up to five users and also comes with nice tools for tracking your work and CI on top of the actual source control bit. You also get 4 hours of free build time per month in the free version (not much but enough to whet your appetite).
Once arrived on the home page I ignored all the fluff and jumped right to it. There’s a New button under Recent projects & teams. Visual Studio Online support Git so I chose that for version control. I tend to like distributed over centralize when it comes to my source control but you can go for TFS if you think centralized might benefit you more.
Next step is to link Visual Studio 2015 to the Visual Studio Online Team Project. Go into Team > Team Explorer. This will bring up the Team Explorer panel:
Just click Connect here. Then go to Servers > Add. Type in the path to Visual Studio Online in the Server box and click OK. Select the project from the list of projects available on Visual Studio Online.
The new Team Project now appears in the Team Explorer panel under the TFS server under the Connect tab (clicking the little plug icon brings this up).
Double clicking the projects name takes you to the Home tab. You can clone the repository from Visual Studio Online here by pressing Clone this repository. Choose a folder and press Clone.
Pressing New under Solutions section brings up the New Project window. Go to Installed > Templates > Visual C# > Web and create ASP.NET Web Application project type.
I used the Web Application from ASP.NET 5 Preview Templates. I kept the authentication as Individual User Accounts as I plan to use this later. I also checked Host in the cloud as I will be deploying to azure.
I configured a new Web App and Database in Azure clicked OK and off we go. At this point Visual Studio will configure the project and restore all the required packages. There are a lot of changes in ASP.NET 5. It’s all very modern. You should read all about it here: http://docs.asp.net/en/latest/conceptual-overview/index.html. Hit F5 and rejoice. It works:
Last step is to go back to the Team Explorer panel into the Changes tab. I used Created template project as a commit message and then commit and push to the remote repository (Visual Studio Online). You can either Commit and Push in one go or just Commit and push later from the Sync tab. Visual Studio Online now shows the last commit and you can look at source history.
Entity Framework 7
Visual Studio Online