ADO.NET Entity Framework

Slides:



Advertisements
Similar presentations
Satisfy Your Technical Curiosity ADO.NET vNext The Entity Data Model, Object Services, and LINQ Bob Beauchemin Director of Developer Resources, SQLskills.
Advertisements

Introduction to NHibernate By Andrew Smith. The Basics Object Relation Mapper Maps POCOs to database tables Based on Java Hibernate. V stable Generates.
An Object/Relational Mapping tool Free and open source Simplifies storage of object data in a relational database Removes the need to write and maintain.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
Michael Pizzo Software Architect Data Programmability Microsoft Corporation.
NHibernate Object/Relational Persistence for.NET.
Change the Rules Distributed data apps with.NET Zlatko Knezevic Developer Evangelist Microsoft
.NET Database Technologies: Open-Source Frameworks.
© Copyright SELA Software & Education Labs Ltd Baruch Hirsch St. Bnei Brak Israel Microsoft Entity Framework v1.1 over Oracle Database Erez.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Introduction to ADO Entity Framework ir Denis VOITURON Source:
Eric Nelson Developer & Platform Group Microsoft Ltd
1 Entity Framework Introduction. Outline Goals of Entity Framework 2.
.NET Database Technologies: Entity Framework additional notes – part 2.
LINQ Boot Camp ADO.Net Entity Framework Presenter : Date : Mahesh Moily Nov 26, 2009.
Entity Framework, a quickstart Florin−Tudor Cristea, Microsoft Student Partner.
ADO.NET ENTITY FRAMEWORK Mike Taulty Developer & Platform Group Microsoft UK
Eric Nelson (or )
NHibernate in Action Web Seminar at UMLChina By Pierre Henri Kuaté 2008/08/27
Visual Studio 2010 and.NET Framework 4 Training Workshop.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
Web Services Week 8 Aims: –Using web services as front ends to databases Objectives: –Review of relational databases –Connecting to and querying databases.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
.NET Database Technologies: Data Models and Patterns.
Ventsislav Popov Crossroad Ltd.. 1. ASP.NET Data Source Controls  SqlDataSource  EntityDataSource  ObjectDataSource 2. Entity Data Model and ADO.NET.
Ronnie Saurenmann Principal Architect Microsoft Switzerland.
ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd
Lap Around Visual Studio 2008 &.NET 3.5 Enhancements.
Oct * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.
AUC Technologies LINQ (Language Integrated Query) LINQ Presented By : SHAIKH SHARYAR JAVED Software Engineer (Daedalus Software Inc.) Technology Teacher.
Ventsislav Popov Crossroad Ltd.. 1. ASP.NET Data Source Controls  SqlDataSource  EntityDataSource  ObjectDataSource 2. Entity Data Model and ADO.NET.
Entity Framework 7: What’s New? Ricardo Peres Technical Evangelist at Simplifydigital. Microsoft
1 A Very Brief Introduction to Relational Databases.
ADO.NET 3.0 – Entity Data Model Gert E.R. Drapers Chief Software Architect Visual Studio Team Edition for Database Professionals Microsoft Corporation.
2 Behind every great site, there is great data Eric Nelson Developer Evangelist Microsoft UK
Data Access Methodologies: When to choose what (ADO.NET, Entity Framework, WCF Data Services) Wriju Ghosh Lead Partner Consultant, Microsoft.
uses of DB systems DB environment DB structure Codd’s rules current common RDBMs implementations.
Top 10 Entity Framework Features Every Developer Should Know
Integrating Data Lesson 6.
Building Enterprise Applications Using Visual Studio®
CompSci 280 S Introduction to Software Development
New Technology: Why, What ,How
Introduction to Entity framework
Part 1: Overview of LINQ Intro to LINQ Presenter: PhuongNQK.
ASP.NET Programming with C# and SQL Server First Edition
Introduction to Entity Framework
“Introduction To Database and SQL”
Chapter 2 Database System Concepts and Architecture
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Language Integrated Query: (LINQ) An introduction
 .NET CORE
Did your feature got in, out or planned?
Entity Framework By: Casey Griffin.
Entity Framework Core for Enterprise Applications
Entity Framework 4 and WCF Data Services 4
ADO.NET Entity Framework Marcus Tillett
ADO.NEXT Advances in Data Access for 2008
“Introduction To Database and SQL”
An Introduction to Entity Framework
Entity Framework Core.
Accessing Data in a .NET Web Application
Entity Framework Core (EF Core)
Tech Ed North America /1/ :36 AM Required Slide
Chapter 7 Using SQL in Applications
Entity Framework Core for Enterprise Applications
Implementing Entity Framework with MVC Jump Start
ADO.NET Entity Framework
Why should I care about SQL, if I have ORM?
Visual Studio 2010 and .NET Framework 4 Training Workshop
Writing Clean & efficient data access code with ADO
Presentation transcript:

ADO.NET Entity Framework September 22, 2018September 22, 2018 MD. SAIFULLAH AL AZAD, Software Architect LEADS Corporation Limited You found me in internet: Blog: www.dotnetbd.wordpress.com LinkedIn: http://bd.linkedin.com/pub/saifullah-azad/69/604/7a8 Facebook: https://www.facebook.com/saifullah.azad

What Is It? Visual Studio 2010 .NET 4.0 LINQ Entity Framework 4.2 The ADO.NET Entity Framework is part of Microsoft’s next generation of .NET technologies. It is intended to make it easier and more effective for object-oriented applications to work with data.

SQL Server Modeling Services Architecture Visual Studio “Quadrant” Data Services Entity Framework ADO.NET “M”/EDM SQL Azure SQL Server … SQL Server Modeling Services

The Logical Data Model Tables Views Stored Procedures Foreign Key Relationships Almost any business application today has to speak to a relational database. This involves the usual suspects of tables with foreign keys, a smattering of views, and generally a gob of stored procedures.

The Object-Oriented Domain Model Objects Behavior Properties Inheritance Complex Types Applications themselves are written in a completely different world. The same data that lives in the relational database is represented entirely differently in the application.

The Result Logical Data Model Lots of Custom Code Application Domain The result of this “impedance mismatch” is that developers devote a lot of time and energy writing code to translate between how the database likes to see data and how the application likes to see data.

Other Ways to Address The Same Problem Hibernate (Java) Enterprise Objects Framework (Mac OS) NHibernate (.NET) LINQ to SQL (Visual Studio 2008) And many, many, more …

The ADO.NET Entity Framework Logical Data Model Entity Data Model Less Custom Code Application Domain The ADO.NET Entity Framework seeks to remedy the problem by providing a layer of abstraction between the logical data model and the application domain.

Why the Entity Model? Logical Data Model Entity Data Model Tables Rows Foreign Keys Entity Data Model Entity Sets Entities Relationships Closer to the application problem space Better suited for object oriented programming Supports Inheritance Supports complex types Relationships are more meaningful to the application

The “Stuff” in ADO.NET Entity Framework The tools and technology that developers will interact with when using the ADO.NET Entity Framework

Entity Data Model A gob of XML that defines Logical Data Tables, Views, Foreign Keys Entity Objects that Map to the Logical Data The Mapping Between the Two

Entity Data Model Designer A Visual Studio Designer that protects developers from the XML that is the EDM

ObjectContext A code-generated data context created from the Entity Data Model Responsible for managing communication between the conceptual data model and the logical data model

Entities Code-generated class definitions for objects defined in the EDM.

Getting the Data Out How do we get data out of the fancy Entity Data Model?

eSQL (Entity SQL) A brand new SQL language to learn Leverages the rich, object-oriented Entity Data Model Inheritance Collections Complex Types Literal Strings – No Compiler Checking Questionable value in embedded SQL in code

Extensions Methods and String Predicates Queries the object model created against the EDM Still string-based. No compiler checking An ugly mix of code and eSQL statements

LINQ to Entities Full compiler checking. No wondering if the query is valid. A fun new SQL-Like syntax More OO-ish

What Can You Do? The power of the Entity Data Model contrasted to a logical data model of tables and stored procedures.

Combine Multiple Logical Tables into One Entity Database Tables Entity Data Model

Implement Inheritance Database Tables Entity Data Model

Other Fun Stuff Implement Complex Types (e.g. Address) Consume Conceptual Model with Reporting Services and other BI Tools Create an EDM that talks to stored procedures Use transactions, manage concurrency, cache execution plans

Manipulate Data By Manipulating Objects Database Result Desired EDM Object Manipulation INSERT ROW Create new object Add object to EDM Context Update Context DELETE ROW Get instance of object from EDM Context Ask Context to remove the object UPDATE ROW Update object

New in ADO.NET Entity Framework 4.0 Model-first development Automatic pluralization Foreign keys in models POCO class support Lazy loading T4 Code Generation Template customization IObjectSet Virtual SaveChanges ObjectStateManager control Self-tracking entities SQL generation improvements More LINQ operator support LINQ extensibility ExecuteStoreQuery ExecuteStoreCommand SPROC import improvements Model defined functions WPF designer integration Code-Only development (Feature CTP)

ADO.NET Today App Code ADO.NET Providers Provider Specific (PL/SQL) “SELECT * FROM CUSTOMERS” Customers ADO.NET Today App Code ADO.NET Customers Command Providers Execute SQL Server Oracle Oracle ... DataReader Customers

ADO.NET Entity Framework Conceptual Model UKCustomer UKPremiumCustomer Customers Map

ADO.NET Entity Framework Provider Agnostic (ESQL) “SELECT * FROM UKCUSTOMER” UKCustomer ADO.NET Entity Framework App Code ADO.NET Conceptual Model UKCustomer UKPremiumCustomer Map Entity Provider Customers Command Execute Providers* DataReader UKCustomer SQL Server Oracle Oracle ...

ADO.NET Entity Framework .NET Entity Provider (Entity SQL) Command Connection Reader EF EF Conceptual Model Entity relationship EF Programming Model Object Relational Mapping LINQ Store Model (SSDL) Entity Data Model (CSDL) Mapping (MSL) Store .NET Data Provider V2.0 Command Connection Reader Adapter

Mapping Examples ( 1 – Splitting ) Store Good Customers ID FirstName LastName Bad Customers ForeName Surname Mapping Customers CustomerId First Last Type Entities Type=“G” Type=“B”

Mapping Examples ( 2 – TPH ) Store Mapping Entities Customers ID FirstName LastName IsPremium Overdraft AccountManager Customer CustomerId First Last ? PremiumCustomer Overdraft AccountManager * Framework also supports TPT

Mapping Examples ( 3 – View + SPs ) Store Mapping Entities ClientView1 select c.id, c.name from customers c where c.country = ‘UK’ UkCustomer CustomerId Name p_DeleteUkCustomer p_UpdateUkCustomer p_InsertUkCustomer

Any Question