Posts

Implement Open API specification in .NET Core Web API using Swagger.

Image
Documentation is always crucial part of development, developers can always check that API is available or not before creating a new one. Swagger is a great framework to use when it comes to API documentation. It's  not only provide the UI but also provide an OpenAPI specification which is used to create client for using the API. Using this specification and Swagger Codegen, you can create client for c#, angular and many more. The purpose of this post is not just to implement swagger but also to describe how you can specify other OpenAPI specification properties like schemes and hosts which is important when you are working with Azure API management. Prerequisites  To follow along you need  Visual studio 2017 Let's Get Started Step 1 : Create a .NET Core API using Visual studio 2017. Step 2 : Remove existing controller and create a new empty controller and name it UserController. Step 3 : Add the following acti

Azure Search - Load Data

Image
This is the third post of blog series on Azure search. In previous post I explain how we can Provision Azure service and how we can create Index . In this post I am going to show you how we can load the data in Azure search service. Now you can import the data which is already present in Azure services like SQL, Blob storage etc or you can import data from other service using code. If  you use existing service, it is going to be a pull operation where indexer will crawl over your data and create indexes. Here I will be explaining how we can push the data to Azure search using .NET SDK. Before jumping on code, let's take a moment and understand what are actions. Actions are nothing but the operations performed on data on the service, these operation can be Upload : Will upload a new record in index. Delete : Will delete an existing record. Merge : Will merge the records with the existing one. Merge Or Upload : Merge if exist otherwise upload the document. Now

Azure Search-Create Index

Image
This is the second post in the series of implementing Azure search. In previous post I described what Azure search is and how can implement it. As discussed in previous post, implementation of Azure search is four step job. Provision Service Create Index Load Data Finally Search. Let's get started. Create Index You can create index from portal as well as code. In this post I will be using the code to create the index and also give the overview to create index from the portal. Overview from portal Let's  go ahead and click on Add Index button on overview screen. Here you will see  Name of the Index Fields: You can insert as many fields as you want. You can also select whether it should be searchable, sortable, filterable, etc.. From Code For this demo I will be using VS 2017 Go ahead and create a .NET core MVC product using visual studio. Install Microsoft.Azure.Search nuget package.  From portal  Copy the Name of the Azure Search.

Azure Search

Image
Today any application you work on, it requires search functionality. For end user search is just a input box where he/she can search whatever they want but implementing search is always difficult because its not just about giving back the result but also giving back the result quickly. To address this problem Microsoft provides the powerful service called Azure service. It is search as a service where you need to focus on the functionality other then search. Let's understand what is azure search and how you can implement in your application. Please note this post is focused on how to implement search instead of, what azure search is. What is Azure Search? Azure search is search as a service which gives you power to  Full text search Search from the document content User experience features Auto complete  Search suggestions Synonyms Sorting Paging There are many more features. You can find it here. How to use Azure Search? Its a four step job. 

Azure Functions

If you are working on or learning Azure then you must have come across this word called Azure Function. A lot of people are talking about it, so let's understand what it is in very simple language. In this series of posts I am going to explain the following  What is Azure function. Create Azure function from the Azure portal Create Azure functions from Visual studio Trigger and Bindings Create APIs using function with bindings  Publish function on Azure I will also be sharing some use cases so that you can relate where exactly you can use Azure functions. This blog series is not going to be only talking but we will also be doing some hands on. So let's start. What is Azure function? To understand that let's assume, you have a front end application which is developed using some java script framework ex angular, react etc. and you need a functionality to upload a file in blob service and this is it, this is your application (might not be realistic to you bu