Skip to main content

Posts

Convert Nested XML to C# class object and C# Class object to Nested XML File

Convert Nested XML to C# class object and C# Class object to Nested XML File Download Project Introduction In this Article we learn how to deserialize XML to C# objects and reverse from C# objects to XML files. In this article we will do practical with example with demo class and xml files. using System; using System.Collections; using System.IO; using System.Xml.Serialization; namespace TestApp {     public class Serializer     {              public T Deserialize<T>(string input) where T : class         {             System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(T));             using (StringReader sr = new StringReader(input))             {                 return (T)ser.Deserialize(sr);  ...

Difference between Table scan,index scan and index seek

Dear Readers, In this Article i am going to introduce "What is the difference between TABLE SCAN , INDEX SCAN and INDEX SEEK". Table Scan:  These all are related to Optimization technique in SQL Server. When we are fetching data from table, By default we are scanning whole table to get our particular data. This is called Table Scan. Ex : Select * From Employee  Index Scan :   Now we are creating index For Employee Table on there id . Ex :  CREATE INDEX index_employee_id ON Employee(id); Now we will run same Query "Select * from Employee", In this case we will scan only Index. So it is called Index Scan. Index Seek : In this case after creating Index we are executing "Select * from employee where id=1". Means we are fetching data with Id. As we are created index on Employee table by there id . So it is called Index Seek.

Sql Server BCP(Bulk Copy Process) for Save file in csv format through stored procedure

Hi Techies,            Today i am going to provide you a solutions for copy data from database and save that data in csv or any type of format in same or another location.  So, For this type of work i used to BCP ( Bulk copy process ) using " xp_cmdshell " command in sql server.  For this process we need Admin rights on SQL Server and  xp_cmdshell access rights.  After taking rights we have to write bellow query in stored procedure.  -------------------------------------------------------------------------------------------------------------- --EXEC ExportTest Create Proc ExportTest AS BEGIN         declare @cmd varchar(1000)     set @cmd ='bcp "SELECT * FROM databasename.[dbo].[tablename]" queryout "C:\\FileTest\test.csv" -c -t ,  -S 10.XXXXXXXX -U username-P Password-T'    exec xp_cmdshell @cmd END -----------------------------------------------...

Angular Step By Step Installation Process

# Angular Step By Step  Hello Techies,        In this post i am going to guide you to install Angular and create and run your first app. Please follow bellow steps.. Step 1 (Node NPM Installation) Node Js ( NPM)  should be installed on system. So for installation of Node Js follow bellow steps. Open  https://nodejs.org/en  .  Download stable Version (LTS) of Node js. After complete the installation open CMD and check the version. Step : 2 (Install Angular by NPM) Type " npm install -g @angular/cli "  2.  Select folder where you are going to create Angular Project.  3. Type ng new 'your app-name' EX:  ng new my-dream-app And Relax it will take some couple of minute to create app , because its downloading all the package from server by npm in you local system. Type : " cd my-dream-app " to select project which is created.  Now Type " ng serve " to run the project...

MVC Interview Questions

MVC Interview Questions What is MVC Application life cycle ? What is default route in MVC? What is Output Caching ? What are Route Constraints in MVC? What are the Benefits of Area in MVC? How do you implement Forms authentication in MVC? What are the Main Razor Syntax Rules? Define attribute based routing in MVC? What are HTML helpers in MVC? What does the MVC pattern define with 3 logical layers? What are the advantages of MVC? List the various return types of a controller action method. What are the types of filters? What are the Filters in MVC? What are the three segments for routing important? What is Route in MVC? what is the difference between ViewData and ViewBag? attribute based routing in MVC? What is GET and POST Actions Types? What is MVC (Model view controller)? What is Validation Summary in MVC? What’s new in the latest version of MVC? How to render html in Asp.net MVC view? Explain the concept of MVC Scaffolding? What is Bundling and Mini...

Sql Server Interview questions ans Part-4

Q#51. What is   SQL Server used for? Ans.  SQL Server is one of the very popular Relational Database Management Systems. This is a product from Microsoft to store and manage the information in the database. Q#52. Which language is supported by SQL Server? Ans.  SQL Server is based upon the implementation of the SQL also known as Structured Query Language to work with the data inside the database. Q#53. Which is the latest version of SQL Server and when it is released? Ans. SQL Server 2017  is the latest version of SQL Server that is available in the market and Microsoft launched this on  2 October 2017  with the support of the Linux O/S. Q#54. What are the various editions of SQL Server 2017 that are available in the market? Ans. SQL Server 2017 is available in 4 editions. These are as follows: Enterprise:  This supports in leading the high performance for  the Tier 1  database along with the capability of supporting busi...

Sql Server Interview Questions Ans Part-3

Q#26. Can we rename a column in the output of SQL query? Ans.  Yes by using the following syntax we can do this. SELECT column_name AS new_name FROM table_name; Q#27. What is the difference between a Local and a Global temporary table? Ans.  If defined in inside a compound statement a local temporary table exists only for the duration of that statement but a global temporary table exists permanently in the database but its rows disappear when the connection is closed. Q#28. What is the SQL Profiler? Ans.  SQL Profiler provides a graphical representation of events in an instance of SQL Server for the monitoring and investment purpose. We can capture and save the data for further analysis. We can put filters as well to captures the specific data we want. Q#29. What do you mean by authentication modes in SQL Server? Ans.  There are two authentication modes in SQL Server. Windows mode Mixed Mode – SQL and Windows. Q#30. How can we check th...