Entity Framework

9
ENTITY FRAMEWORK Sapan Patel +9712363687 [email protected]

description

 

Transcript of Entity Framework

Page 1: Entity Framework

ENTITY FRAMEWORK

Sapan Patel

+9712363687

[email protected]

Page 2: Entity Framework

WHAT IS ENTITY FRAMEWORK ?

The Microsoft Entity Framework is an Object/Relational Mapping (ORM) framework.

Object-Relational Mapping (ORM) is a programming technique for automatic mapping and converting data Between relational database object and Domain objects

ORM creates a “virtual object database“

Which can be used from within the programming language, e.g. C# or Java

Page 3: Entity Framework

ORM frameworks typically provide the following functionality:

Creating object model by database schema Creating database schema by object model Querying data by object-oriented API Data manipulation operations CRUD – create, retrieve, update, delete

ORM frameworks automatically generate SQL to perform the requested data operations

Page 4: Entity Framework

ORM MAPPING – EXAMPLE

Database and Entities mapping Diagrams for a subset of the database

4

Relational database schema

ORM Entities (C# Classes)

ORMFramewor

k

Page 5: Entity Framework

ADVANTAGE OF ADO.NET EF

Easy to map business objects (with drag & drop tables on environment).

It keeps a good performance when you work with a small / middle domain model.

Its fast and straight forward using LINQ/FE objects For Add/Modify/Delete/Update.

the framework provides the core data access capabilities so developers can concentrate on application logic

Page 6: Entity Framework
Page 7: Entity Framework

ENTITY FRAMEWORK FEATURES

Entity Framework (EF) standard features: Maps tables, views, stored procedures and

functions as .NET objects Provides LINQ-based data queries Executed as SQL SELECTs on the database

server

CRUD operations – Create/Read/Update/Delete Create compiled queries – for executing the

same parameterized query multiple times Creating or deleting the database schema

Page 8: Entity Framework

ARCHITECTURE

Page 9: Entity Framework

THANK YOU !