ASP.NET Core 2.1 preview 1 is already out and available for everyone. Read this post to find out how to get started with it. ASP.NET Core 2.1 comes with lots of new features like HTTPS by default, HTTPClientFactory, SignalR, and others. To know all the new features, you can read this post. So now it’s a good time to migrate existing ASP.NET Core 2.0 application to ASP.NET Core 2.1. Read More
Tag: ASP.NET Core
How to create an Angular 5 app with Visual Studio 2017
Earlier, I posted about creating an Angular 4 app with VS 2017 and also posted a guide to upgrade an Angular 4 app to Angular 5 with VS 2017. Now you can also create Angular 5 app with Visual Studio 2017, without installing any third-party extensions or templates. This post talks about how to create an Angular 5 App with Visual Studio 2017 and how to extend it with a simple example. Read More
Quick summary of what’s new in ASP.NET Core 2.1
Earlier I posted about new features of .NET Core 2.1 having screenshots and video links from the official announcement. Now it’s time to look into things in more detail and with a little explanation to understand things better. Therefore, in this post, find a short and quick summary of what’s new in ASP.NET Core 2.1.
Store complex objects in ASP.NET Core Session
The ASP.NET Core Session object has 3 methods to set the session value, which are Set
, SetInt32
and SetString
. The Set
method accepts a byte array as an argument where the SetInt32
and SetString
method are the extension methods of the Set
method. These methods internally cast the int or string to a byte array. Similar to these, there are 3 methods used to retrieve the value from the session: Get
, GetInt32
and GetString
. There is no method available to store complex objects in session, and this post shows how to store complex objects in ASP.NET Core Session. Read More
Quick Tip – Return HTTP Status Code from ASP.NET Core Methods
It is advisable to return the proper HTTP status code in response to a client request. This helps the client to understand the request’s result and then take corrective measure to handle it. Proper use of the status codes will help to handle a request’s response in an appropriate way. Out of the box, ASP.NET Core has inbuilt methods for the most common status codes. Like,
return Ok();
// Http status code 200return Created();
// Http status code 201return NoContent();
// Http status code 204return BadRequest();
// Http status code 400return Unauthorized();
// Http status code 401return Forbid();
// Http status code 403return NotFound();
// Http status code 404
New features of .NET Core 2.1
Earlier this week, Microsoft published the roadmap for .NET Core 2.1, ASP.NET Core 2.1 and EF Core 2.1, expected to be out in the first quarter of 2018. The team also talked about several new features with this new release. This release is more of a feedback-oriented release based on .NET Core 2.0 release. The.NET Core 2.0 is a huge success and already more than half a million developers are now using .NET Core 2.0. All thanks to .NET Standard 2.0 release. In this post find out about the new features of .NET Core 2.1. Read More
Create Petstore like Swagger UI for ASP.NET Core WEB API
Swagger doesn’t need an introduction as it is the world’s largest framework of API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API life-cycle, from design and documentation, to test and deployment. Swagger is an UI representation of your RESTful API. It allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources having none of the implementation logic in place. The Petstore (created by the swagger team) is a demonstration of the beautiful Swagger UI. You can easily integrate the Swagger in your application, but the sad part is you will get a different UI, not same as available @ Petstore. In this post, let’s find out how to create Petstore like Swagger UI for ASP.NET Core WEB API.
Read More