Tuesday, November 23, 2021

Mocking API Responses in Azure API Management Portal

A mock API imitates a real API call by providing a realistic JSON or XML response to the requester. Mock APIs can be designed on a developer’s computer or in the cloud. Responses of mock API can be static or dynamic, which simulates the data the real API world send as a response. Mock APIs are very useful for parallel development when APIs are still being developed and developers want to test expected behaviors simultaneously. Mock APIs can save a lot of time as API calls can help programmers use valuable unit tests and make it easier to identify problems.

More

Sunday, June 20, 2021

Create & Publish an Azure Function in Visual Studio 2019

A mock API imitates a real API call by providing a realistic JSON or XML response to the requester. Mock APIs can be designed on a developer’s computer or in the cloud. Responses of mock API can be static or dynamic, which simulates the data the real API world send as a response. Mock APIs are very useful for parallel development when APIs are still being developed and developers want to test expected behaviors simultaneously. Mock APIs can save a lot of time as API calls can help programmers use valuable unit tests and make it easier to identify problems.

More

Build & Deploy an ASP.NET Core App to Azure App Service

Microsoft Azure has multiple services for hosting HTTP-based web applications. Visual Studio developers can directly publish web applications to the cloud. Azure supports a wide range of programming languages like .NET Core, .NET, Java, Ruby, Node.js, PHP, Python, and more. Applications hosted on Azure App Service can run and scale seamlessly in both Windows and Linux-based environments. In this article, I will create a .NET Core app and deploy it in Azure App Service using Visual Studio.

More

Thursday, April 04, 2019

Capturing an Image from a Webcam Using .NET

Webcams are an easy and cost-effective way to take images from a video stream. In this modern era of smartphones, everyone has a camera which could be used by Web applications to capture live pictures. It's a widely used feature in the business world. In this article, I'm going to show you how to capture a simple image and display in a Web page. We are going to use the "jQuery-webcam" JavaScript library for capturing image from a Webcam. You also can store it in a folder and database.

Benefits of the Microsoft Azure Cosmos DB

Microsoft Azure Cosmos DB is an abstraction level over data stores like Azure DocumentDB and Table Storages, which is a globally distributed multi-model database service. The benefit of Cosmos DB is that it provides low latency reads and writes, even when they still implement a single write node and multiple read nodes in their geo-replication feature. Developers can quickly create and query documents, key/value, and graph databases using Azure Cosmos DB.

Using .NET to Access Blob Storage with Microsoft Azure

The Azure Blob storage solution is used to store unstructured physical objects in Microsoft Cloud. It's optimized for storing massive amounts of unstructured data, such as text or binary data which could be accessed by using HTTP and HTTPS protocols from anywhere an Internet connection is available. In this article, I will provide you a step-by-step demonstration on how to create a Blob storage solution from Azure Portal and create and download files from Blob storage programmatically from C# code.
More 

Using JsonResult Types in ASP.NET MVC

The JSON format is an open standard format. It's a very familiar and commonly used concept. It's a data interchange medium and is very lightweight. Developers use different JSON types for data transformation. JsonResult is an ActionResult type in MVC. It helps to send the content in JavaScript Object Notation (JSON) format. In this article, I will explain how to access the data from a JsonResult object and display it in a browser with an example.

An Introduction to Azure Redis Cache

Redis Cache service has been added to Microsoft Azure, based on the most popular open source Redis Cache. It's one of the cache service offerings from Microsoft Azure allows the user to have access of rich features. Redis supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, and geospatial indexes. A cache created using Azure Redis Cache is accessible from any application within Microsoft Azure. Redis Cache could be used as an advanced approach of storing or caching application data that is available across distributed systems.

Fundamentals of Mock Objects in Unit Testing

Mock is an object to simulates the behavior of a real method/object in a controlled environment for unit testing. A developer learns mocking as a skillset and uses mock frameworks as a tool during unit testing. Mock objects help to isolate the component being tested from the components it depends on by applying mock objects effectively. Mocking is an important part of test-driven development (TDD). In this article, I'll demonstrate fundamentals of mocking with a C# examples, how it helps in writing unit tests, and the different ways to do mocking.
More 

Palindrome Checking in C#

A Palindromic number or string can be read in both directions. It's a form of word puzzle. A numeral Palindrome is a number which remains the same when its digits are reversed. The term palindromic is derived from Palindrome, which refers to a word whose spelling is unchanged when its letters are reversed.

Working with Dictionaries in C#

In .NET, a Dictionary class is a collection of a key and value pair of data. C# represents a generic Dictionary class that can be used to create a collection of objects. The key should be identical in a key-value pair and it can have at most one value in the dictionary. TKey represents the data type used for the dictionary's keys, and TValue represents the data type used to store the information or data associated with a key. This class is defined in the System.Collections.Generic namespace. You should import the System.Collections.Generic namespace in code to use the dictionary.

Object Pooling in C#

Object pooling is a software creational design pattern and a container of objects that holds a list of other objects—those are ready to be used. Once an object is taken from the pool, it is not available in the pool until it is put back. Object pooling keeps track of Objects—those are currently in use, the number of objects the pool holds, and whether this number should be increased. Objects in the pool have a lifecycle of creation, validation, and destroying.

Exploring Cloudyn and Its Use

Microsoft acquired Israeli-based Cloud startup Cloudyn. Cloudyn helps customers to manage their Cloud billing across multiple Cloud accounts. Cloudyn's software as a service (SaaS) model allows you to track Cloud usage and expenditures of Organization-level Azure, AWS, and Google Cloud accounts. Microsoft Azure cost management by Cloudyn can help users to monitor and optimize Cloud computing costs. By using Cloudyn, you also can set up notifications to alert users when Cloud spending exceeds a certain threshold. Overall, Cloudyn helps you analyze costs, create and manage budgets, export data, and review and act on optimization recommendations to save money.

Introducing GitLab Serverless

GitLab, partnering with the multi-Cloud serverless management platform provider TriggerMesh, has released GitLab Serverless capabilities to its existing DevOps solution. Serverless uses Google's Knative, the Kubernetes-based platform to build, deploy, and manage modern workloads. Users now can install Knative on Kubernetes clusters via GitLab and then deploy their serverless functions. GitLab Serverless is available with GitLab 11.6 from December 22nd and the "Serverless" tab is available for users as an alpha offering.

How to Load Data into an Azure SQL Database

SQL Server on-premises BULK INSERT is a very popular method to import data from a local SQL file to SQL Server. The BULK INSERT feature also could be used to import data from a file stored in an Azure storage account to SQL Server on-premises. Because Azure is growing each day and SQL Server is improving the features to connect SQL Server on-premises, BULK INSERT could be a powerful tool to import data because it is fast and it can be easily combined with T-SQL code. In this article, I will demonstrate with examples how developers can use the traditional BULK INSERT statement to load data from a local CSV file or Azure blob to Azure SQL DB.

Extracting Text from an Image Using Tesseract in C#

Tesseract engine optical character recognition (OCR) is a technology used to convert scanned paper documents, PDF files, and images to searchable text data. The OCR engine detects the characters present in the image and puts those characters into words, enabling developers to search and edit the content of the document. Tesseract optical character recognition engine is one of the most accurate OCR engines currently available for .NET. It's licensed under Apache 2.0 and has been supported by Google since 2006. Tesseract OCR library is available for various different operating systems. In this article, I will demonstrate extracting image text using Tesseract and writing C# code under Windows OS.

How to Create an Azure Storage Account

An Azure storage account provides a namespace to store data objects such as blobs, files, queues, tables, and disks. An Azure storage account provides durability and highly availability, security, massive scalability, and accessibility from anywhere in the world over HTTP or HTTPS services. Developers can create a new storage account for use within the Azure Resource Manager (ARM) portal. Azure's pay-as-you-go service model is recommended to business for storing only a few hundred GBs or trillions of objects. For developers, Azure storage supports .NET, Ruby, and Java for REST, and can be accessed from multiple Windows and Linux operating systems. In this article, I will demonstrate how to create Azure storage from an ARM portal.

Handling ASP.NET Web API Query String Parameters

Parameters passing in the query string of an ASP.NET API GET request don't really pass in a general fashion; parameters have to be specified explicitly in the routing configuration methods. The parameters you specify on your controller action get mapped to parameters sent in the query string of a GET request. In this article, I will describe how to pass multiple parameters in a query string of a Web API URL.

Working with the Kendo UI Grid with ASP.NET MVC

To present tabular data in our Web applications, developers generally use HTML tables or other UI libraries. Kendo UI Grid is an easy, more maintainable, and powerful control for displaying data in a tabular format. Kendo provides many options, such as paging, sorting, filtering, grouping, and editing. These features determine the way data is presented and manipulated. Telerik Kendo UI® Core is the open source framework and version of Kendo UI. It's a comprehensive framework for building modern Web and mobile apps with HTML5 and JavaScript. In this article, I will demonstrate the basic usage of the Kendo UI Grid control, which is used to work with tabular data.

Wednesday, December 26, 2018

DotPeek Tool: A .NET Decompiler

The dotPeek decompiler tool was initially introduced by Microsoft. It's a free-of-charge, standalone tool-based decompiler for any .NET assemblies. It converts .NET assemblies into equivalent C# code and optionally shows the underlying IL code. A dotPeek application can decompile different kinds of assembly files, such as Libraries (.dll), Executable files (.exe), Windows 8 metadata files (.winmd), Archives (.zip), NuGet packages (.nupkg), and Microsoft Visual Studio Extensions packages (.vsix).

Mocking API Responses in Azure API Management Portal

A mock API imitates a real API call by providing a realistic JSON or XML response to the requester. Mock APIs can be designed on a developer...