Friday, May 8, 2020
SQl Database Cache Cleanup
Saturday, January 18, 2020
Some Basics about SOAP and REST
Simple Object Access Protocol
is a defined protocol used for communication. It is a protocol that defines a
set of rules for communication using XML-based messaging.
REpresentational State Transfer is not
based on any protocol but has a standard architecture principle used to send
data over standard protocols (HTTP).
SOAP Works purely on XML based, while REST supports JSON,
XML, Microformats etc.
SOAP Doesn’t support Error Handling, while REST has built in
Error handling.
SOAP requires standard tools with middle ware support while
REST doesn’t require any standard tools but requires a standard URI for data
transfer.
SOAP is a heavy weight protocol but a distinct advantage is
its language, platform and most importantly it is transport protocol
independent while REST is light-weight architecture.
SOAP is compatible and secure; this ensures SOAP services are
not blocked firewall while REST is fast and efficient but with a disadvantage
of web caching.
SOAP is used widely for asynchronous processing of
information over the internet while REST is a stateless protocol.
Implementing REST for complex applications can sometimes be
very difficult. This is basically because you need to implement all the major
components like security, transaction, and addressing separately. SOAP is
always an intelligent choice with increasing complexity. Also, SOAP is the best
option when the application is based on internal API’s and the communication
between the server-client is minimal. However, if the application is for developing
third-party API’s or public API’s REST seems to be a better and efficient
option.
Tuesday, July 30, 2019
Interview Questions 1-2 Years
1 - 2 Years
C#
1. What is OOPS, please brief2. How to implement multiple inheritance
3. What is encapsulation
4. Difference between encapsulation and Abstraction
5. Difference between var and dynamic
6. Difference between read-only and const
7. What is static class, What is static function?
8. What is extension Methods? Have you created any?
9. What is Dependency Injection? How many ways to implement it?
10. What is constructor chaining?
11. What is default constructor? Can I make database call from constructor?
12. What is private constructor?
13. How to call base class constructor from drived class?
14. How can we access private variable outside a class?
15. Difference between ref and out parameter?
16. Difference between IEnumerable and List?
Ans. IEnumerable is readonly
17. What is difference between IEnumerable and IQueryable?
Ans. IEnumerable executes in memory i.e. load all records and then apply filter. IQueryable will execute in database directly.
18. What is generic?
19. What is delegate?
MVC
1. Page life cycle2. How many Filters?
3. How to implement Filters?
4. What is action result and how many types?
5. How to create a form in razor syntex?
6. What is authentication and authorization?
7. What is Model binding?
8. How to do model validations?
Web Api
1. Which protocol it works on?2. What are Http verbs and which verb used for what purpose?
3. How to use multiple Get and multiple Post methods in a controller?
4. How many types of routings? Which you used?
5. How to enable CORS?
Javascript
1. It is multi threaded?2. What are selectors?
3. What is promise?
4. Can we implement async await ?
5. What is fat arrow function?
6. What is spread operator?
7. Ajax?
Sqlserver
1. Why we use view?2. Difference between View and SP?
3. Difference between Primary and Unique key?
4. Why SP execute faster?
5. How to optimize a SP?
6. What are triggers and its types
7. What is indexing?
Monday, July 29, 2019
Interview Questions 4+
2. What is diamonds issue in asp. Net
3. What data contract in WCF
4. What is important components in WCF
5. Can we call WCF from angular
6. What rest call
7. How to extend the view
C#
Web Forms
MVC
Web Api
Javascript
Sqlserver
11. Recursive Stored Procedures
12. Magic Table in SQL
13. Basic Types of Joins in SQL (HASH, MERGE and LOOP)
AngularJS
Angular
NodeJS
ReactJS
IONIC
Typescript
Monday, February 18, 2019
SQL Database Backup - Restore Using SQL Query
Here we have some script to take database backup and restore quickly using SQL queries.
We can bypass the wizard by using the following TSQL scripts.
In below our database name is Test_DB, for which we will take backup and restore using TSQL scripts.
Backup Database
USE [master];
GO
/*
@date - Will Create a Date Timestamp to attach with database Backup file name for
our future reference (this is an optional, we can set anything instead of Date
Timestamp)
@disk1 : This is a Database backup File Location
*/
DECLARE @date NVARCHAR(19) = REPLACE(REPLACE(REPLACE(CONVERT(NVARCHAR(19), GETDATE(), 120), ':', ''),'-',''),' ',''),
@disk1 NVARCHAR(256) = N'';
SET @disk1 = N'C:\DataBase Backup\Test_DB_' + @date + N'.bak';
BACKUP DATABASE [Test_DB]
TO
DISK = @disk1
WITH NOFORMAT,
NOINIT,
NAME = N'Test_DB-Full Database Backup',
SKIP,
NOREWIND;
Restore Database
USE [master];
GO
--Main DB
RESTORE DATABASE
[EMS_Amajuba_Niren]
FROM DISK = N'C:\DataBase Backup\Test_DB_20190511091135.bak' --do a find and replace on the date string
WITH FILE = 1,
--REPLACE, /* On second restore, add this to
overwrite the previous backup */
MOVE N'Test_DB'
TO N'C:\Data\Test_DB.mdf',
MOVE N'Test_DB_Log'
TO N'C:\Log\Test_DB.ldf',
STATS = 5;
GO
Some times we have error while database restore that database on which we are going to restore is still in use by some one, we can use below script to check whoever is using the database or if any active query window for this database
SELECT spid,
hostname,
program_name,
hostprocess,
loginame,
login_time
FROM sys.sysprocesses
WHERE dbid IN
(
SELECT database_id FROM sys.databases WHERE name = 'EMS_Amajuba_niren'
);
Thursday, January 3, 2019
Replace Patter in String in SQL Server
Configure Console Application as Windows Service
To configure a console application as a Windows Service , you'll need to follow several steps, which typically involve writing a se...
-
Here we have some script to take database backup and restore quickly using SQL queries. We can bypass the wizard by using the following TSQL...
-
To Replace a specific String Pattern in SQL server, create a below function first CREATE FUNCTION dbo . PatternReplace ( @Inp...
-
To configure a console application as a Windows Service , you'll need to follow several steps, which typically involve writing a se...
