Blog posts on .NET, Azure, and more.

Building a custom dotnet cli tool

July 18, 2016 by Anuraj

dotnet core dotnet cli C#

This post is about building a custom dotnet cli tool, using this you can extend the dotnet cli for various operations like minifing images, scripts, css etc. The tools used by the .NET CLI are just console applications, so you can create a dotnet core console application and use it. In this post I am building a tool to optimize images in the web application. I am using the ImageProcessorCore package.

Consuming WCF Services in ASP.NET Core

July 16, 2016 by Anuraj

ASP.NET Core WCF Service C# .Net

This post is about consuming WCF Services in ASP.NET Core. With the availability of .Net Core RC2 and ASP.NET Core RC2 Microsoft introduced an update to the WCF Connected Service Preview for ASP.NET 5 Visual Studio extension tool for generating SOAP service references for clients built on top of WCF for .NET Core RC2. To consume a WCF Service, first you need to install the WCF Connected Service extension, which can be downloaded and installed using Extensions and Updates feature from Tools. Or you can download it from Visual Studio Gallery. Please make sure youre installing the required prerequisites, otherwise it may not install successfully. Once installation completed successfully, you can create a new ASP.NET Project and consume the service. This tool retrieves metadata from a WCF service in the current solution, locally or on a network, and generates a .NET Core 1.0.0 compatible source code file for a WCF client proxy that you can use to access the service.

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.

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