1 / 16

ADO.NET Entity Framework 소개

ADO.NET Entity Framework 소개. 2008.11.15. 한용희 Microsoft Visual C# MVP http://blog.naver.com/woom333. 차례. Programmer VS. Data Base Administrator Object VS. Data LINQ LINQ Project LINQ to SQL LINQ to Entities LINQ to DataSet 유연한 매핑 M:N 매핑 Entity Splitting Table per Hierarchy

ifama
Download Presentation

ADO.NET Entity Framework 소개

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ADO.NET Entity Framework 소개 2008.11.15 한용희 Microsoft Visual C# MVP http://blog.naver.com/woom333

  2. 차례 • Programmer VS. Data Base Administrator • Object VS. Data • LINQ • LINQ Project • LINQ to SQL • LINQ to Entities • LINQ to DataSet • 유연한 매핑 • M:N 매핑 • Entity Splitting • Table per Hierarchy • Table per Type • DEMO

  3. Programmer VS. Data Base Administrator

  4. Object VS. Data Object Object Object Conceptual Model Mapping Storage Model

  5. LINQ(Language Integrated Queries)

  6. <book> <title/> <author/> <year/> <price/> </book> Relational Objects XML LINQ Project .NET Language Integrated Query LINQ toObjects LINQ toDataSets LINQ toSQL LINQ toEntities LINQ toXML C# 3.0 Visual Basic 9.0 Others

  7. LINQ to SQL • 신속한 개발을 해야 할 때 • Microsoft SQL Server만 지원 • 직접 매핑(Direct Mapping) • 한 클래스는 SQL 스키마 한 객체에 직접 대응 • 테이블 , 뷰 • 저장 프로시저, 테이블 값 함수(Table Valued Function) • 테이블, 컬럼에 대한 이름 변경 • 외래키를 통하여 관계를 설정 • 상속 • TPH (Table per Hierarchy) 지원

  8. LINQ to Entities • 엔터프라이즈급에서 사용 • 다양한 DB(Oracle, DB2, Microsoft SQL Server) 사용 가능 • 유연한 매핑(Flexible Mapping) • 하나의 클래스를 다수의 테이블/뷰와 매핑 • 상속 • TPH (Table per Hierarchy) • TPT (Tableper Type) • Complex Type (예: 주소[시,구,동,번지] 타입) • M:N 관계 표현

  9. LINQ to DataSet • 비연결 기반 (Disconnected Cache) • 형식화된 데이터 집합(Typed DataSet) • 필드명으로참조 • 형식화 되지 않은 데이터 집합(Untyped DataSet) • 강력한 타입으로 참조 var query = from row in myDataSet.Tables["Customers"].AsEnumerable() where row .Field<string>("City") == "London" select new { row.Field <string> ("CustomerID"), row.Field <string> ("ContactName") } ; var query = from customer in northwind.Customers where customer.City == "London" select customer;

  10. 유연한 매핑 (Flexible Mapping)

  11. M:N 매핑

  12. Entity Splitting Entity Data Model Relational Data Source

  13. Table Per Hierarchy(TPH) Entity Data Model Relational Data Source

  14. Table Per Type (TPT) Entity Data Model Relational Data Source

More Related