Blog
Blog posts on .NET, Azure, and more.
Slack Authentication with ASP.NET Core
July 16, 2016 by Anuraj
ASP.NET Core OAuth 2 Authentication Slack
This post is about implementing authentication with Slack. Similar to Linkedin or GitHub, Slack also supports OAuth 2 protocol for authentication. In this post, for authenticating a user against slack, the generic OAuth middleware is used. To use OAuth middleware you require few details about the OAuth provider.
Entity Framework Core Scaffold DbContext from Existing Database
July 14, 2016 by Anuraj
ASP.NET Core Nuget EF Entity Framework
This post is about reverse engineering model classes from existing database using Entity Framework Core. This is useful in Database First scenarios than the Code First scenario. In order to scaffold a DbContext from an existing database, you first have to set up project.json file. You need to add reference of Entity Framework tools in the project.json file tools section. For this post I am generating DbContext and model classes from Sqlite Database. So I am using EF Sqlite references as well.
Using nuget packages in ASP.NET Core
July 12, 2016 by Anuraj
ASP.NET Core Nuget
While developing ASP.NET Core you might face some situations where you have the source code with you, but the nuget package is not available. One example is ImageProcessorCore where source code is available, but nuget package is not available, if you want to use this library in your project, you first need to create a package out of it and host it locally.
Using PostgreSQL with ASP.NET Core
July 02, 2016 by Anuraj
ASP.NET Core PostgreSQL EF Migration
This post is about using PostgreSQL with ASP.NET Core. PostgreSQL is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. Recently in ASP.NET Forums, someone asking about using postgresql with ASP.NET Core. Since I don’t have an installed version available, I thought I will use postgresql as a service version from elephantsql.com. They are offering a free tier postgresql database. You can register yourself and can create databases. In this post I am using EF Migrations for creating databases. So I am using a ASP.NET Core Web API project, I have created a API project with ASP.NET YO Generator. To connect to postgresql server, you require “Npgsql.EntityFrameworkCore.PostgreSQL” nuget package, and for EF migrations you require “Microsoft.EntityFrameworkCore.Tools” package. Here is the project.json file.
Bundling and Minification in ASP.NET Core
June 29, 2016 by Anuraj
ASP.NET Core Bundling Minification
This post is about Bundling and Minification in ASP.NET Core. Bundling and minification are two techniques you can use in ASP.NET to improve page load performance for your web application. Bundling combines multiple files into a single file. Minification performs a variety of different code optimizations to scripts and CSS, which results in smaller payloads. In ASP.NET Core RTM release Microsoft introduced “BundlerMinifier.Core” tool which will help you to bundle and minimize Javascript and style sheet files. Unlike previous versions MVC, the bundling and minification is happening on development time not in runtime. To use “BundlerMinifier.Core” first you need to add reference of BundlerMinifier.Core in the project.json tools section.
Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub