Saturday, November 9, 2013

What is Class?

A class is the blue print from where individual objects are created.  For example in real world, we may find many individual objects of same kind. There may be thousands of bikes in existence, all of the same make and model. Each bike was built from the same set of blueprints and therefore contains the same component. In object oriented terms, we say that our bike is an instance of the class of objects known as bikes.

The following Bike class is one of implementation of a bike.

class Bike {
        int Speed = 0;
        int Gear = 0;
        void SpeedUp(int increment)
        {
            Speed += increment;
        }
        void ApplyBreakes(int decrement)
        {
            Speed -= decrement;
        }
    }

Simple example of class is

class SampleClass {
   

    }

What is Object Oriented Programming?

Object oriented programming is a programming language model organized around objects rather than action, and data rather than logic. Objects have both data fields and associated procedures called methods. Objects are instances of classes and used to interact with one another to design applications and computer programs.

Saturday, October 26, 2013

Key Concepts of Entity Data Model

The Entity Data Model (EDM) uses three key concepts to describe the structure of data: entity type, association type, and property. These are the most important concepts in describing the structure of data in any implementation of the EDM.
Entity Type
In a conceptual model, An entity represents a specific object (such as a specific customer or order). Each entity must have a unique entity key within an entity set.
Association
In a conceptual model, an association represents a relationship between two entity types (such as Customer and Order).
Property
Entity types contains properties that define the structure and characteristics of Entities. For example, a Customer entity type may have properties such as CustomerId, Name, and Address.

What are Advantages and Disadvantages of Entity Framework

There are several advantages and disadvantages of using Entity Framework.
Advantages

  • No need to write the Data access layer code. Entire Data access layer code will be generated by the Entity  Designer (.edmx file). 
  • For small applications, no need to write Stored procedures for the CRUD opeartions (Insert,Update,Delete and modify). The Designer will provide the implementation. Developer need to consume those methods.
  • Reduces development effort and Unit Testing effort.
Disadvantages
  • As the queries are dynamic there might be a hit in the performance of the application.

What is Microsoft ADO.NET Entity Framework

The Microsoft ADO.NET Entity Framework (EF) is an Object/Relational Mapping (ORM) framework that enables developers to work with relational data as domain-specific objects, eliminating the need for most of the data access plumbing code that developers usually need to write.

The Entity Framework works with Microsoft SQL Server and 3rd party databases through extended ADO.NET Data Providers, providing a common query language against different relational databases through either LINQ to Entities or Entity SQL.