The Entity Framework Database First Approach give an alternative option instead of Code First and Model First approaches to the Entity Data Model .it generate model codes (classes, properties, DbContext etc.) from the selected database. So, Entity Framework database First approach, add new ADO.NET Entity Data Model and Select Generate from database EF Designer model in Entity Data Model Wizard.

Entity Framework Model First approach, enable to you create your model in Entity Framework designer and then generate SQL, which will create database schema to match your model and then you execute the SQL to create the schema in your database. The classes that you communicate with in your application are automatically generated from the EDMX file.

Entity Framework provides Code-First approach from Entity Framework 4.0. Code-First is mainly useful for First design model for business domain requirement instead of database Design. In the Code-First approach, you can focus on the business domain design and start creating classes as per your business domain requirement rather than design your database first and then create the classes which match your database design. Entity framework code first automatically create database when run your application.

The SQL NULL is the term used to represent a missing or unknown value. A NULL value in a table is a value in a column that appears to be blank. A column with a NULL value is a field with no value. It is very important to understand that a NULL value is different than a zero value or a field that contains spaces.

The SQL server SUM() function returns the total sum of a numeric column. Let's see the Syntax for the select sum function:

The Cursor is a Database object which allows us to process each row and manipulate its data. A Cursor is always associated with a Select Query and it will process each row returned by the Select Query one by one. Using Cursor we can verify each row data, modify it or perform calculations which are not possible when we get all records at once.

Class is a design, declaration or blueprint that is used for grouping object. It encapsulates variable members, functions, structure, properties, events and many more components. It is the basic constructing block of object oriented programming. You can create as many instances of your class .you can create a class by using class keyword.

The foreach loop is a different kind of looping statement in C# programming that doesn’t includes initialization, termination and increment/decrement characteristics. It uses collection or array to take value one by one and then processes them.

There are many situations when you want to execute a block of statements a several number of times in your applications in that case you can use for loop. The for loop first evaluated condition. If it is true, the loop executes and the process repeats itself (body of loop, then increment step, and then again testing for a condition). After the condition becomes false, the for loop terminates.

The C# while loop statement executes a statement or a block of statements until a specified expression evaluates to false . In some situation you may need to execute the loop at least one time and then check the condition. In this case you can use do..while loop.