AddTransient: It will create a new instance each time it is accessed. e.g when I call it from the MVC Controller and from frontend MVC code, I will get 2 independent instances

AddScoped: It will create a new instance for the particular request, e.g when I call it from MVC Controller and frontend MVC Code, it’s the same instance. However it does not survive across different OWIN middleware

AddSingleton: Creates a single instance for all requests

AddInstance: Creates a single instance for all requests, but the constructor is left to the developer

Every once in a while, you get a request from your developer telling you that they have reformatted their machine and unfortunately there is still one or 2 files inside that workspace that they forgot to checkout

Visual studio comes with tools that allows you to undo checkout. Unfortunately it runs from the CLI

The operation completed successfully. Because the workspace JD-PC2;JohnDoe is not on this computer, you must perform a separate get operation in that workspace to update it with the changes that have been made on the server.

EF 7.0 supports both code first aka POCO as well as database first. However you do need a bit of tweaking in order to get EF to generate the classes for you. Take note that edmx files are no longer used for EF 7.0.

Common errors that you will typically encounter when you see “One or more errors occurred.”:

Take note that the stack trace is VERY long, so you will need to scroll right to the front to see the error message

System.AggregateException: One or more errors occurred. —>Microsoft.Data.Entity.Design.OperationException: Unable to find design-time provider assembly. Please install the EntityFramework.SqlServer.Design NuGet package and ensure that the package is referenced by the project. —> System.IO.FileNotFoundException: Could not load file or assembly ‘EntityFramework.SqlServer.Design’ or one of its dependencies. The system cannot find the file specified.

-> this means project.json does not have the EntityFramework.SqlServer.Design, save the project file and do a dnu restore to ensure that all the packages are restored

System.AggregateException: One or more errors occurred. —>System.Data.SqlClient.SqlException: Login failed for user ‘myusername’.

-> obvious, means you entered the wrong password or are connecting to the wrong database server