Showing posts with label Visual Studio 2015. Show all posts
Showing posts with label Visual Studio 2015. Show all posts

Tuesday, October 11, 2016

Asp .Net Core Part 2 : Using Visual Studio

Visual Studio 2015 is the most preferred tool for creating Asp .Net Core Applications. I am starting an Asp .Net Core Web Application from New Project option.


Staring with an Empty project so that we can gradually build the application instead of getting overwhelmed with a plenty of options.


In the Solution Explorer we can see project.json which we already explore in Part 1,




When I run the application I get the Hello World output.





public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
        {
            loggerFactory.AddConsole();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.Run(async (context) =>
            {
                await context.Response.WriteAsync("Hello World from Shalvin!");
            });
        }

I am making alteration in WriteAsync method within Configure method.

By running the application again you can see the new output.