21 May 2022

Azure Service Fabric

 

·    Azure Service Fabric is Microsoft’s Platform-as-a-Service (PaaS) and is used to build and deploy microservices-based cloud applications.

·       Support Stateless and Stateful service

·       development through deployment, daily monitoring, management, and maintenance, to eventual decommissioning.

·       Support in both Windows and Linux.

31 December 2021

Azure Service Bus

·       Reliable cloud messaging as a service (MaaS) and simple hybrid integration

·       Distribute messages to multiple independent back-end systems

·       Brokering messaging between client and server with asynchronous operations along with structured first-in, first-out (FIFO) messaging and publish/subscribe capabilities.

·       Safely routing and transferring data and control across service and application boundaries

·       While a queue is often used for point-to-point communication, topics are useful in publish/subscribe scenarios.

·      Dead-lettering - Service Bus supports a dead-letter queue (DLQ) to hold messages that cannot be delivered to any receiver, or messages that cannot be processed. You can then remove messages from the DLQ and inspect them.

21 April 2019

Step by step for deploying .Net application in Azure

Step by step for deploying .Net application in Azure

Group INSERT, UPDATE, and DELETE operations from a DataSet or DataTable

Group INSERT, UPDATE, and DELETE operations from a DataSet or DataTable

Batch support in ADO.NET allows a DataAdapter to group INSERT, UPDATE, and DELETE operations from a DataSet or DataTable to the server, instead of sending one operation at a time. The reduction in the number of round trips to the server typically results in significant performance gains. Batch updates are supported for the .NET data providers for SQL Server (System.Data.SqlClient) and Oracle (System.Data.OracleClient).

public static void BatchUpdate(DataTable dataTable,Int32 batchSize) 

    // Assumes GetConnectionString() returns a valid connection string. 
    string connectionString = GetConnectionString(); 
 
    // Connect to the AdventureWorks database. 
    using (SqlConnection connection = new 
      SqlConnection(connectionString)) 
    { 
 
        // Create a SqlDataAdapter. 
        SqlDataAdapter adapter = new SqlDataAdapter(); 
 
        // Set the UPDATE command and parameters. 
        adapter.UpdateCommand = new SqlCommand( 
            "UPDATE Production.ProductCategory SET " 
            + "Name=@Name WHERE ProductCategoryID=@ProdCatID;", 
            connection); 
        adapter.UpdateCommand.Parameters.Add("@Name", 
           SqlDbType.NVarChar, 50, "Name"); 
        adapter.UpdateCommand.Parameters.Add("@ProdCatID", 
           SqlDbType.Int, 4, "ProductCategoryID"); 
         adapter.UpdateCommand.UpdatedRowSource = UpdateRowSource.None; 
 
        // Set the INSERT command and parameter. 
        adapter.InsertCommand = new SqlCommand( 
            "INSERT INTO Production.ProductCategory (Name) VALUES (@Name);", 
            connection); 
        adapter.InsertCommand.Parameters.Add("@Name", 
          SqlDbType.NVarChar, 50, "Name"); 
        adapter.InsertCommand.UpdatedRowSource = UpdateRowSource.None; 
 
        // Set the DELETE command and parameter. 
        adapter.DeleteCommand = new SqlCommand( 
            "DELETE FROM Production.ProductCategory " 
            + "WHERE ProductCategoryID=@ProdCatID;", connection); 
        adapter.DeleteCommand.Parameters.Add("@ProdCatID", 
          SqlDbType.Int, 4, "ProductCategoryID"); 
        adapter.DeleteCommand.UpdatedRowSource = UpdateRowSource.None; 
 
        // Set the batch size. 
        adapter.UpdateBatchSize = batchSize; 
 
        // Execute the update. 
        adapter.Update(dataTable); 
    } 
}

Referred from following link
https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/performing-batch-operations-using-dataadapters

JSLint tools for Javascript

JSLint tools for Javascript

JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.

JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location within the source. The problem is not necessarily a syntax error, although it often is. JSLint looks at some style conventions as well as structural problems. It does not prove that your program is correct. It just provides another set of eyes to help spot problems.

JSLint defines a professional subset of JavaScript, a stricter language than that defined by the ECMAScript Programming Language Standard (the strangely named document that governs JavaScript). JSLint will reject most legal programs. It is a higher standard.

JavaScript is a sloppy language, but hidden deep inside there is an elegant, better language. JSLint helps you to program in that better language and to avoid most of the slop. JSLint will reject programs that browsers will accept because JSLint is concerned with the quality of your code and browsers are not. You should gladly accept all of JSLint's advice.

JSLint help link
http://www.jslint.com/help.html

JSLint download
http://www.javascriptlint.com/download.htm


Implementing OAuth validation in a Web API

 I mplementing OAuth validation in a Web API Implementing OAuth validation in a Web API using C# typically involves several key steps to sec...