1 / 9

EntityFrame work and LINQ

EntityFrame work and LINQ. CH 14. linq. LINQ enables you to query data from a wide variety of data sources, directly from your programming code. LINQ is to .NET programming what SQL is to relational databases.

benard
Download Presentation

EntityFrame work and LINQ

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. EntityFrame work and LINQ CH 14

  2. linq • LINQ enables you to query data from a wide variety of data sources, directly from your programming code. LINQ is to .NET programming what SQL is to relational databases

  3. LINQ is an important plumbing technique in many data-access scenarios, including database access in ASP.NET web applications using the ADO.NET Entity Framework. LINQ is so important, it has been integrated in many different places in .NET. LINQ is available for objects enabling you to query in-memory collections. Additionally, LINQ is available for XML, Entities, ADO.NET, and DataSets, each type providing access to a different data store, but with the same, unified querying language. LINQ is also used as the query language for the ADO.NET Entity Framework.

  4. ADO.NET Entity Framework • ADO.NET Entity Framework (EF) is an object-relational mapping (ORM) framework for the .NET Framework

  5. To work with EF in your ASP.NET web applications you have a couple of different options. First,you can write queries in the Code Behind of a page and then bind the results to a data-bound control using the DataSource property and DataBind method of the control. Alternatively, you can use the EntityDataSource control that serves as the bridge between your data-bound controls and your model. Combined with the new ListView and DataPager controls, the EntityDataSource gives you the ability to create fully functional CRUD pages.

  6. ADO.NET Entity Framework abstracts the relational (logical) schema of the data that is stored in a database and presents its conceptual schema to the application

  7. At development time, this abstraction eliminates the object-relational impedance mismatch that is otherwise common in conventional database-oriented programs. The run-time overhead of mapping between the conceptual schema and the underlying relational schema is still a factor to be considered.

  8. in a conventional database-oriented system, entries about a customer and their information can be stored in a Customer table, their orders in an Order table and their contact information in yet another Contact table. The application that deals with this database must "know" which information is in which table, i.e., the relational schema of the data is hard-coded into the application.

  9. Object-relational impedance mismatch • The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object-oriented programming language particularly when objects or class definitions are mapped in a straightforward way to database tables or relational schemata.

More Related