Tuesday, 28 September 2021

IQ

  1. What tecnics are using for generating tokens
  2. Which one is faster DBfirst or code first
  3. what is bundle config and CDN
  4. what is application object and session object and differenece
  5. abstarct class and interface
  6. IIS request processing
  7. status codes-403,200,500
  8. what render
  9. web api testing tecnincs
  10. difference web api,wcf.
  11. without using try block how to handle exceptions
  12. verbs in web api
  13. what are contracts
  14. diffbetween service contract and message contract
  15. solid principles
  16. How to Install certificates in IIS
  17. Passport authentication works
  18. Difference between Webservice/WCF
  19. Webapi Token types
  20. Code first/DB first approach Which one better
  21. Where configure endpoints in WCF
  22. Differenec between XML/JSON
  23. Bundle config/CDN which one is better

Monday, 20 September 2021

IQ

  1. What is Base class for Asp.net
  2. Authentication and Authorization config settings
  3. Forms Authentication config settings
  4. Difference between Datareader/Dataset, Handlers/Modules
  5. How to make web api calls asynchronously.
  6.  How many ways to pass data to View to controller
  7. Merge key word in sql.
  8. CTE main purpose
  9. Solid principles
  10. What type of code in Pre render
  11. CI/CD process.
1) Given number is even or odd in c# without using condition

using System;
class test 
{
  static void Main() 
   {
    string[] arr = {"Even", "Odd"};
      
    Console.Write("Enter the number: ");
     
    string val;

    val = Console.ReadLine();

    int no = Convert.ToInt32(val);
 
    Console.WriteLine(arr[no%2]);
  }
}

2) How can Select Only last Row of the Table Using Sql

   SELECT TOP 1 * FROM MyTable ORDER BY MyColumn ASC

3) scaling in sql server

  Horizontal and vertical scaling

   The following figure shows the horizontal and vertical dimensions of scaling, which are the basic ways the elastic databases can be scaled.

  Horizontal scaling refers to adding or removing databases in order to adjust capacity or overall performance, also called "scaling out". 



Sharding, in which data is partitioned across a collection of identically structured databases, is a common way to implement horizontal scaling.
Vertical scaling refers to increasing or decreasing the compute size of an individual database, also known as "scaling up."

Most cloud-scale database applications use a combination of these two strategies. For example, a Software as a Service application may use horizontal scaling to provision new end-customers and vertical scaling to allow each end-customer's database to grow or shrink resources as needed by the workload.

Horizontal scaling is managed using the Elastic Database client library.

Vertical scaling is accomplished using Azure PowerShell cmdlets to change the service tier, or by placing databases in an elastic pool.

Cons of JavaScript

1. Client-side Security

Since the JavaScript code is viewable to the user, others may use it for malicious purposes. These practices may include using the source code without authentication. Also, it is very easy to place some code into the site that compromises the security of data over the website.

2. Browser Support

The browser interprets JavaScript differently in different browsers. Thus, the code must be run on various platforms before publishing. The older browsers don’t support some new functions and we need to check them as well.

3. Lack of Debugging Facility

Though some HTML editors support debugging, it is not as efficient as other editors like C/C++ editors. Also, as the browser doesn’t show any error, it is difficult for the developer to detect the problem.

4. Single Inheritance

JavaScript only supports single inheritance and not multiple inheritance. Some programs may require this object-oriented language characteristic.

5. Rendering Stopped

A single code error can stop the rendering of the entire JavaScript code on the website. To the user, it looks as if JavaScript was not present. However, the browsers are extremely tolerant of these errors.

Difference between inline query and stored procedure

1.Stored procedures are strored in a pre complied form.That is once a Stored procedure is executed, the compiled code is used in subsequent calls. This is not possible with inline queries.

2.Stored procedures reduces network traffic. 
Since Stored procedures are stored in the server, only the name of Stored procedure is required to pass to the server. But in the case of inline queries , the complete query has to be passed to the server. So inline queries will increase network traffic when the queries are very large.

3.Stored procedures support Deferred Name Resolution.That is we can create stored procedures for objects(eg:- tables) which are not yet created ( and will be creating in the near future)

4.Stored procedures prevents SQL Injection Errors.

5.By using Stored procedures we can seperate all the queries from the Business logic code.
Therefore we can create a seperate layer.
But while writing inline queries , all the queries have to be written (mixed up ) with the business logic code. This create problem while debugging.

6.Developers can work simultaneously while using stored procedures.
While a programmer writes business logic, another one can create stored procedures at the same time.