Top Banner
Entity Framework Entity Framework MIS 324 MIS 324 Professor Sandvig Professor Sandvig
11

Entity Framework

Feb 11, 2016

Download

Documents

sema

Entity Framework. MIS 324 Professor Sandvig. Outline. What is Entity Framework Benefits Drawbacks Example. What is Entity Framework. Microsoft’s newest data access technology Visual Studio: Examines database Creates objects that represent data schema LINQ (Language Integrated Query) - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Entity Framework

Entity FrameworkEntity FrameworkMIS 324MIS 324

Professor SandvigProfessor Sandvig

Page 2: Entity Framework

OutlineOutline

What is Entity FrameworkWhat is Entity Framework BenefitsBenefits DrawbacksDrawbacks ExampleExample

Page 3: Entity Framework

What is Entity FrameworkWhat is Entity Framework

Microsoft’s newest data access Microsoft’s newest data access technologytechnology

Visual Studio:Visual Studio: Examines databaseExamines database Creates objects that represent data schemaCreates objects that represent data schema

LINQ (Language Integrated Query)LINQ (Language Integrated Query) Replaces SQLReplaces SQL Select, sort, filter, etc.Select, sort, filter, etc.

Page 4: Entity Framework

BenefitsBenefits

Eliminates disconnect between code & Eliminates disconnect between code & databasedatabase No sql statements in codeNo sql statements in code

Use intellisense to write queryUse intellisense to write query LINQ works on all data collectionsLINQ works on all data collections

Arrays, lists, dataviews, etc.Arrays, lists, dataviews, etc.

Page 5: Entity Framework

DrawbacksDrawbacks

Microsoft propriety technologyMicrosoft propriety technology LINQ query syntax different than SQLLINQ query syntax different than SQL

Better in many waysBetter in many ways Synchronization between database and Synchronization between database and

entity objects entity objects Change databaseChange database Rebuild entity objectsRebuild entity objects

Page 6: Entity Framework

Creating ModelCreating Model

Page 7: Entity Framework

Creating ModelCreating Model

Page 8: Entity Framework

Creating ModelCreating Model

Page 9: Entity Framework

Creating ModelCreating Model

Note: Relationships should be defined in database

Page 10: Entity Framework

LinqLinq

Page 11: Entity Framework

OutputOutput

Music Store ExampleMusic Store Example