like

Friday, September 21, 2012

Delete ALL data From DATABASE

Execute the following query:(in new  query editor ):




EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL' 
GO 

EXEC sp_MSForEachTable 'DELETE FROM ? WHERE 1 = 1' 
GO 

EXEC sp_MSForEachTable 'ALTER TABLE ? CHECK CONSTRAINT ALL' 
GO

EXEC sp_MSforeachtable "DBCC CHECKIDENT ( '?', RESEED, 0)"

How to Test your REST API using Firefox restclient Tool


Monday, March 12, 2012

Where you should put the Script manager in .ASPX page

Difference between class and struct in C# .Net

1. Classes are reference types and structs are value types.
Since classes are reference type, a class variable can be assigned null.But we cannot assign null to
a struct variable, since structs are value type.

2. When you instantiate a class, it will be allocated on the heap.When you instantiate a struct, it gets created on the stack.

3. You will always be dealing with reference to an object ( instance ) of a class. But you will not be dealing with references to an instance of a struct ( but dealing directly with them ).

4. When passing a class to a method, it is passed by reference. When passing a struct to a method, it’s passed by value instead of as a reference.

5. You cannot have instance Field initializers in structs.But classes can have
example:
class MyClass
{
int myVar =10; // no syntax error.
public void MyFun( )
{
// statements
}
}
struct MyStruct
{
int myVar = 10; // syntax error.
public void MyFun( )
{
// statements
}
}
6. Classes can have explicit parameterless constructors. But structs cannot have

7. Classes must be instantiated using the new operator. But structs can be

8. Classes support inheritance.But there is no inheritance for structs.( structs don’t support inheritance polymorphism )

9. Since struct does not support inheritance, access modifier of a member of a struct cannot be protected or protected internal.

11. A class is permitted to declare a destructor.But a struct is not
12. classes are used for complex and large set data. structs are simple to use.


In .NET, there are two categories of types, reference types and value types.

Structs are value types and classes are reference types.

The general different is that a reference type lives on the heap, and a value type lives inline, that is, wherever it is your variable or field is defined.

A variable containing a value type contains the entire value type value. For a struct, that means that the variable contains the entire struct, with all its fields.

A variable containing a reference type contains a pointer, or a reference to somewhere else in memory where the actual value resides.

This has one benefit, to begin with:

value types always contains a value
reference types can contain a null-reference, meaning that they don't refer to anything at all at the moment

Internally, reference types are implemented as pointers, and knowing that, and knowing how variable assignment works, there are other behavioral patterns:

copying the contents of a value type variable into another variable, copies the entire contents into the new variable, making the two distinct. In other words, after the copy, changes to one won't affect the other
copying the contents of a reference type variable into another variable, copies the reference, which means you now have two references to the same somewhere else storage of the actual data. In other words, after the copy, changing the data in one reference will appear to affect the other as well, but only because you're really just looking at the same data both places

When you declare variables or fields, here's how the two types differ:

variable: value type lives on the stack, reference type lives on the stack as a pointer to somewhere in heap memory where the actual memory lives
class/struct-field: value type lives inside the class, reference type lives inside the class as a pointer to somewhere in heap memory where the actual memory lives.

How to generate script in MICROSOFT SQLServer Data Base

goto Misrosoft sql management express

Open and then login
Select any Database,right click on that and then go to Task
and click on Generate Script

and follow the following steps according to defined as in Guideline window.

Thanks.

Sunday, January 29, 2012

Making Design Documentation

USE

microsoft VISIO 2010

--for best design

Best Presentation Way

1>you must introduce your self first if their is some one new and remember that this introduction is based on your Audience like if they are technical then give your technical background knowledge and if they are corporate world then introduce your corporate related achievement.

2>Write your name top Left of Board and up side.[FULL NAME-if you are addressing new one.]

3>AGENDA-what you are going to TALK about.set your expectation by your talk with audience.or you can say "DEFINE DOMAIN".


3>>Most important --maximum 20 slides or minimum 15 slides.(they have some point about topic not whole story.)

in which
first slide belongs to your INTRODUCTION
2nd one belongs to AGENDA
and next 11slides belong to ABOUT YOUR PRESENTATION TOPIC
14th slide belongs to QUESTION AND ANSWER
15th slide belongs to THANKS NOTES


Do during the presentation:--
Make your eye contact with every one.
if you can't satisfy with your answer at that moment and you think that its contained huge data relation then tell him a single line answer "I WILL BACK TO YOU"

in your ppt -----
Center is contain with Necessary data. and bottom right and bottom left contain unnecessary data.

PPT +DOCUMENT {LINKS + BIOGRAPHY +REPOSITORY}+code Sample

*code sample for showing relation with that.