SlideShare ist ein Scribd-Unternehmen logo
1 von 19
ADO.NET Data Services&Entity FrameworkDiana NemeşuSeptember 2009 1
Agenda 2 ,[object Object]
Intro ADO.NET Data Services:	- Why? 	- How? ,[object Object]
Demo,[object Object]
Telemon Overview 4 Sensor1 Sensor2 Device (SmartPhone) Server Telemon Doctor Application TelemonDataBase Telemon Services
Device Application 5
Doctors Application 6
ADO.NET Data Services “Astoria”http://astoria.mslivelabs.com/  7
Why? 8 Provides an API that allows data to be created and consumed over HTTP using RESTful service.   Supports all database operations using URI.   Can expose an entity model via an URI.   Is RESTful service to support CRUD operations on database.   Could be consumed by any type of client like Windows, Silverlight, Web , AJAX and console.
How? 9 Data is sent over HTTP in both directions; Defines a hosting interface IDataServiceHost that abstracts its implementation from a specific host (WCF, ASP.NET, IIS);  Server operations:   - static layer that implements URL translation  - data source being surfaced to the data service.
Concepts 10 REST:      - focuses on key components that enable easy integration and interaction with other systems;    - approaches the need for interoperability and communication between systems through separation of layers; 	- Yahoo, Facebook, Flickr, Amazon, Google, ebay, digg;
11 The ADO.NET Data Services framework provides patterns and libraries that enable the creation and consumption of data driven services for the web; Expose Data Source to Data Service: - Entity Framework  - LINQ to SQL  - Surfacing custom data sources using CLR classes  - Creating a custom IQueryable<T> provider to surface a custom data source Offline-Enabled Data Services (Astoria Offline)
System Requirements 12 Microsoft .NET Framework 3.5 SP1  Visual Studio 2008 SP1 ADO.NET Data-access providers  	(Microsoft SQL Server 2005)
ADO.NET Entity Framework 13 Introduction ADO.NET Providers Entity Data Model (EDM) Mapping Database Schema vs Conceptual Schema Using Object Model http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx
Introduction to Entity Framework 14 Is a set of data access APIs for the Microsoft .NET Framework; Version 1 was included with .NET Framework 3.5 SP1 and Visual Studio 2008 SP1; version 4.0 is available in Beta form as part of  Visual Studio 2010; Abstracts the relational(logical) schema of the data that is stored in a database and presents its conceptual schema to the application;
15 ADO.NET Providers: Connector/Net(MySQL), DB2.NET, dotConnect, Oracle Data Provider for .NET, DataDirect Connect for ADO.NET, Npgsql; EDM:  	- specifies the conceptual model of the data via the Entity-Relationship data model; 	- the EDM schema is expressed in the Schema Definition Language (XML format); Mapping:  a 1:1 (one to one) mapping is generated between the database schema and the conceptual schema;
Conceptual Schema Database Schema  16
Using Object Model  17 using(telemonEntities DB=new telemonEntities())  { foreach (User user in DB.User)        { Console.WriteLine("User{0} ** Username{1}", user.Id, user.Username);         } foreach (Alarmealarma in DB.Alarme)        { Console.WriteLine(              "Alarm: {0} ** Username: {1} ** Session: {2}", alarma.Id, alarma.User.Username, alarma.PacientSession.Name);       } ObjectQuery<SignalData> signals = DB.SignalData; IQueryable<SignalData> signalList =                     from s in signals                     select s; foreach (SignalData signal in signalList  { Console.WriteLine("Signal{0} ** Session{1} ** 	Username{2}", signal.Id, signal.PacientSession.Name, signal.PacientSession.User.Username);  }
Demo 18

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
Harman Bajwa
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questions
Bilam
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
Doncho Minkov
 
Orion Context Broker workshop (CPMX5)
Orion Context Broker workshop (CPMX5)Orion Context Broker workshop (CPMX5)
Orion Context Broker workshop (CPMX5)
Fermin Galan
 

Was ist angesagt? (20)

Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code First
 
Introducing Entity Framework 4.0
Introducing Entity Framework 4.0Introducing Entity Framework 4.0
Introducing Entity Framework 4.0
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Ef code first
Ef code firstEf code first
Ef code first
 
Introduction to ado
Introduction to adoIntroduction to ado
Introduction to ado
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questions
 
ODI User and Security
ODI User and Security ODI User and Security
ODI User and Security
 
Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)
 
Web Programming - 5 Passing and Request Data
Web Programming - 5 Passing and Request DataWeb Programming - 5 Passing and Request Data
Web Programming - 5 Passing and Request Data
 
Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Entity Framework - Queries
Entity Framework -  QueriesEntity Framework -  Queries
Entity Framework - Queries
 
Understanding Flex Data Services
Understanding Flex Data ServicesUnderstanding Flex Data Services
Understanding Flex Data Services
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
 
Entity Framework - Object Services
Entity Framework -  Object ServicesEntity Framework -  Object Services
Entity Framework - Object Services
 
Orion Context Broker workshop (CPMX5)
Orion Context Broker workshop (CPMX5)Orion Context Broker workshop (CPMX5)
Orion Context Broker workshop (CPMX5)
 

Ähnlich wie ADO.NET Data Services & Entity Framework

Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Win net presentacion [2005]
Win net presentacion [2005]Win net presentacion [2005]
Win net presentacion [2005]
Raul Soto
 
Course Notes-Unit 5.ppt
Course Notes-Unit 5.pptCourse Notes-Unit 5.ppt
Course Notes-Unit 5.ppt
SafaM3
 
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBMData Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
mfrancis
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
Ali Taki
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
ukdpe
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
Dave Allen
 

Ähnlich wie ADO.NET Data Services & Entity Framework (20)

Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Introduction To Dot Net Siddhesh
Introduction To Dot Net SiddheshIntroduction To Dot Net Siddhesh
Introduction To Dot Net Siddhesh
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
 
unit 3.docx
unit 3.docxunit 3.docx
unit 3.docx
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2
 
5c8605.ado.net
5c8605.ado.net5c8605.ado.net
5c8605.ado.net
 
Dot net Introduction and their usabilities
Dot net Introduction and  their usabilitiesDot net Introduction and  their usabilities
Dot net Introduction and their usabilities
 
ADO.NET Data Services
ADO.NET Data ServicesADO.NET Data Services
ADO.NET Data Services
 
Win net presentacion [2005]
Win net presentacion [2005]Win net presentacion [2005]
Win net presentacion [2005]
 
Course Notes-Unit 5.ppt
Course Notes-Unit 5.pptCourse Notes-Unit 5.ppt
Course Notes-Unit 5.ppt
 
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBMData Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
Data Capture in IBM WebSphere Premises Server - Aldo Eisma, IBM
 
Top 10 Things in Visual Studio 2008 since 2005
Top 10 Things in Visual Studio 2008 since 2005Top 10 Things in Visual Studio 2008 since 2005
Top 10 Things in Visual Studio 2008 since 2005
 
e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)e-SUAP - Data access server side (English)
e-SUAP - Data access server side (English)
 
Understanding the Windows Azure Platform - Dec 2010
Understanding the Windows Azure Platform - Dec 2010Understanding the Windows Azure Platform - Dec 2010
Understanding the Windows Azure Platform - Dec 2010
 
Net Fundamentals
Net FundamentalsNet Fundamentals
Net Fundamentals
 
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming ParadigmProgramming Without Coding Technology (PWCT) Features - Programming Paradigm
Programming Without Coding Technology (PWCT) Features - Programming Paradigm
 
Practical OData
Practical ODataPractical OData
Practical OData
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2
 

ADO.NET Data Services & Entity Framework

  • 1. ADO.NET Data Services&Entity FrameworkDiana NemeşuSeptember 2009 1
  • 2.
  • 3.
  • 4.
  • 5. Telemon Overview 4 Sensor1 Sensor2 Device (SmartPhone) Server Telemon Doctor Application TelemonDataBase Telemon Services
  • 8. ADO.NET Data Services “Astoria”http://astoria.mslivelabs.com/ 7
  • 9. Why? 8 Provides an API that allows data to be created and consumed over HTTP using RESTful service.  Supports all database operations using URI.  Can expose an entity model via an URI.  Is RESTful service to support CRUD operations on database.  Could be consumed by any type of client like Windows, Silverlight, Web , AJAX and console.
  • 10. How? 9 Data is sent over HTTP in both directions; Defines a hosting interface IDataServiceHost that abstracts its implementation from a specific host (WCF, ASP.NET, IIS); Server operations: - static layer that implements URL translation - data source being surfaced to the data service.
  • 11. Concepts 10 REST: - focuses on key components that enable easy integration and interaction with other systems; - approaches the need for interoperability and communication between systems through separation of layers; - Yahoo, Facebook, Flickr, Amazon, Google, ebay, digg;
  • 12. 11 The ADO.NET Data Services framework provides patterns and libraries that enable the creation and consumption of data driven services for the web; Expose Data Source to Data Service: - Entity Framework - LINQ to SQL - Surfacing custom data sources using CLR classes - Creating a custom IQueryable<T> provider to surface a custom data source Offline-Enabled Data Services (Astoria Offline)
  • 13. System Requirements 12 Microsoft .NET Framework 3.5 SP1 Visual Studio 2008 SP1 ADO.NET Data-access providers (Microsoft SQL Server 2005)
  • 14. ADO.NET Entity Framework 13 Introduction ADO.NET Providers Entity Data Model (EDM) Mapping Database Schema vs Conceptual Schema Using Object Model http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx
  • 15. Introduction to Entity Framework 14 Is a set of data access APIs for the Microsoft .NET Framework; Version 1 was included with .NET Framework 3.5 SP1 and Visual Studio 2008 SP1; version 4.0 is available in Beta form as part of Visual Studio 2010; Abstracts the relational(logical) schema of the data that is stored in a database and presents its conceptual schema to the application;
  • 16. 15 ADO.NET Providers: Connector/Net(MySQL), DB2.NET, dotConnect, Oracle Data Provider for .NET, DataDirect Connect for ADO.NET, Npgsql; EDM: - specifies the conceptual model of the data via the Entity-Relationship data model; - the EDM schema is expressed in the Schema Definition Language (XML format); Mapping: a 1:1 (one to one) mapping is generated between the database schema and the conceptual schema;
  • 18. Using Object Model 17 using(telemonEntities DB=new telemonEntities()) { foreach (User user in DB.User) { Console.WriteLine("User{0} ** Username{1}", user.Id, user.Username); } foreach (Alarmealarma in DB.Alarme) { Console.WriteLine( "Alarm: {0} ** Username: {1} ** Session: {2}", alarma.Id, alarma.User.Username, alarma.PacientSession.Name); } ObjectQuery<SignalData> signals = DB.SignalData; IQueryable<SignalData> signalList = from s in signals select s; foreach (SignalData signal in signalList { Console.WriteLine("Signal{0} ** Session{1} ** Username{2}", signal.Id, signal.PacientSession.Name, signal.PacientSession.User.Username); }
  • 20. 19 ADO.NET Data ServicesQuestions Diana Nemeşu din@rms.ro dyana0106@yahoo.com