SQL Server Compact Edition 3.5 and the Entity Framework Rob Sanders and Matt Lynch.

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.
Yukon – What is New Rajesh Gala. Yukon – What is new.NET Framework Programming Data Types Exception Handling Batches Databases Database Engine Administration.
.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.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Originally founded in 1985 as Rock Financial by Dan Gilbert Grew to one of the largest independent mortgage banks in the country 1998 IPO 1999 Launched.
ISYS 512 Business Application Design and Development with.Net David Chao.
Fundamentals, Design, and Implementation, 9/e Chapter 11 Managing Databases with SQL Server 2000.
SQL Server 2005 Database Engine Sommarkollo Microsoft.
ISYS 512 Business Application Design and Development with.Net David Chao.
05 | Data Access with Entity Framework Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
What’s new for Rich Clients? Martin Parry Developer & Platform Group Microsoft Ltd
Passage Three Introduction to Microsoft SQL Server 2000.
A tour of new features introducing LINQ. Agenda of LINQ Presentation We have features for every step of the way LINQ Fundamentals Anonymous Functions/Lambda.
Discover, Master, InfluenceSlide 1 SQL Server Compact Edition and the Entity Framework Rob Sanders Readify.
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
Introduction to ADO Entity Framework ir Denis VOITURON Source:
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Overview of SQL Server Alka Arora.
LINQ Boot Camp ADO.Net Entity Framework Presenter : Date : Mahesh Moily Nov 26, 2009.
ISYS 512 Business Application Design and Development with.Net David Chao.
Session 1 - Introduction and Data Access Layer
Native Support for Web Services  Native Web services access  Enables cross platform interoperability  Reduces middle-tier dependency (no IIS)  Simplifies.
Entity Framework, a quickstart Florin−Tudor Cristea, Microsoft Student Partner.
Database Technical Session By: Prof. Adarsh Patel.
Entity Framework Overview. Entity Framework A set of technologies in ADO.NET that support the development of data-oriented software applications A component.
1 Hammad Khan. COURSE CONTENTS.NET Framework And C# SQL Server 2008 ADO.NET LINQ ASP.NET Dynamics Data ASP.NET MVC framework 2 Advance C# Concepts Windows.
Searching Business Data with MOSS 2007 Enterprise Search Presenter: Corey Roth Enterprise Consultant Stonebridge Blog:
Alcatel-Lucent CDC Workshop, Coaching & Knowledge Transfer Architecture.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
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.
SQL Server 2005 Implementation and Maintenance Chapter 12: Achieving High Availability Through Replication.
Master Data Management & Microsoft Master Data Services Presented By: Jeff Prom Data Architect MCTS - Business Intelligence (2008), Admin (2008), Developer.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Mr.Prasad Sawant, MIT Pune India Introduction to DBMS.
ISYS 512 Business Application Design and Development with.Net David Chao.
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
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
Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET
Sharepoint-Biztalk Integration with Multiple Transport protocols Jin Thakur
ASP.net Course From Intermediate to Advance level By Arsalan Ahmed 3 Months Course Cell :
Exploring Networked Data and Data Stores Lesson 3.
Fundamental of Database Systems
Top 10 Entity Framework Features Every Developer Should Know
Building Enterprise Applications Using Visual Studio®
Introduction to DBMS Purpose of Database Systems View of Data
Introduction to Entity framework
Visual Basic 2010 How to Program
Introduction to Entity Framework
Working in the Forms Developer Environment
Introduction to Visual Basic 2008 Programming
Did your feature got in, out or planned?
Entity Framework By: Casey Griffin.
ADO.NET Entity Framework Marcus Tillett
ADO.NET Entity Framework
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
ADO.NEXT Advances in Data Access for 2008
Entity Framework Core.
Data Model.
SSDT and Database Project Basics
Chapter 11 Managing Databases with SQL Server 2000
Visual Studio + SQL Server Is Better
ADO.NET Entity Framework
Visual Studio 2008.
.NET Framework V3.5+ & RESTful web services
Navigating SSMS Primer for Beginners
Presentation transcript:

SQL Server Compact Edition 3.5 and the Entity Framework Rob Sanders and Matt Lynch

About Us Matt is an independent contractor who specializes in SharePoint, Entity Framework and C# and the.Net Framework. Rob is a consultant for Readify in Brisbane and spends his time between SQL Server, Team Foundation Server and BizTalk.

Presentation Agenda Introduction to the ADO Entity Framework Overview of SQL Server Compact Edition 3.5 Entity Framework Fundamentals Followed by.. Advanced Entity Framework Finally.. Entity Framework and SQL Compact Edition – Together!

Origins of this Presentation Rob> Hey mate, I’m working with LINQ to SQL and SQL Server Compact Edition Matt> Cool, hey did you know Compact Edition supports the Entity Framework? Rob> Hmmmm Rob> We’ve got to do a presentation on it! Matt> Absolutely!

Microsoft’s Data Access Strategy “ The Entity Data Platform is a multi-release vision, with future versions of reporting tools, replication, data definition, security, etc. all being built around a common Entity Data Model. “ – Mike Pizzo, Architect, Data Programmability April, 2007 Source:

Introducing the ADO.Net Entity Framework(EF) The goal of EF is to decrease the amount of code and maintenance required for data- oriented applications Entity Framework is central to Microsoft’s data access strategy for the.Net Framework Shipped with.Net Framework 3.5 SP 1 Underpinned by LINQ to Entities

The Entity Data Model The Entity Data Model is a Entity-Relationship data model which supports advanced features such as: – Abstract classes – Property / Entity renaming – Inheritance – Complex Types – Stored procedure mapping for insert, update and delete methods. – Mapping a single entity to multiple tables – Hiding join tables in collections – Documentation which populate Xml comments

Entity Data Model The Entity Data Model uses a.edmx file which consists of 3 sections – Conceptual Schema Definition Language(CSDL) – Store Schema Definition Language (SSDL) – Mapping Specification Language (MSL) Created by the Designer (or by hand, if you are game) Managed by the Metadata Workspace at run time Embedded in your assembly as a resource Entity Connection String specifies the data location – Use EntityConnectionStringBuilder to build a connection string at runtime Discover, Master, InfluenceSlide 8

Entity Framework Objects Metadata Workspace – Runtime component which maintains the CSDL, SSDL, MSL and CLR objects. Object State Manager – Maintains object state and identity management for entity type instances and relationship instances – Tracks query results, and provides logic to merge multiple overlapping query results. – It also performs in-memory change tracking when a user inserts, deletes, or modifies objects, and provides the change set for updates. This change set is used by the change processor to persist modifications Object Context – Primary class for interacting with data from a Entity Data Model – Encapsulates a connection to the database, the metadata workspace and the object state manager – Handle this like you would handle a Sql connection – open/close. For windows forms, use one ObjectContext per application instance. For web forms, use one ObjectContext per request – and use the EntityDataSource! Discover, Master, InfluenceSlide 9

Entity SQL Write queries independently of the data store with a more concise language – Provides a common query language across providers by extending the existing SQL language with constructs to work with strong notions of type, inheritance, and relationships from the Entity Data Model SQL – SELECT sp.FirstName, sp.LastName, sp.HireDate FROM SalesPerson sp INNER JOIN Employee e ON sp.SalesPersonID = e.EmployeeID INNER JOIN Contact c ON e.EmployeeID = c.ContactID WHERE e.SalariedFlag = 1 AND e.HireDate >= ' ' Entity SQL – SELECT sp.FirstName, sp.LastName, sp.HireDate FROM AdventureWorks.AdventureWorksDB.SalesPeople AS sp WHERE e.HireDate >= ' ‘ – Only used for select statements

Entity Framework Basics Demos Happen Here! Entity Data Model Basic Queries

The SQL Server Family The SQL Server 2008 Family of Products Enterprise Standard Workgroup Web Express Compact

Overview of SQL Compact Edition 3.5 Relational Database Flat File based Memory and CPU conscious design In-Process No installation ODBC/ADO Supported Runs on Windows Mobile and Desktop Platforms Also supported by the Sync Framework (SQL Server 2008)

What’s new in Compact Edition 3.5? Synchronization Options – Sync Framework, Remote Data Access, Merge replication Extended T-SQL support – CROSS APPLY – CAST – TOP Transaction Scope (On Desktops) – Read Committed (default), Repeatable Read, Serializable Identity Columns Unicode support Multi User, supports 256 connections – recommend < 100 LINQ to SQL and, of course, Entity Framework!

Be Honest, What’s the Downside? No support for Views No support for Triggers No support for Stored Procedures or UDFs Does not support smalldatetime, xml, varchar(max), nvarchar(max), char(c), varchar(n) datatypes You cannot integrate CLR assemblies No Full Text Search indexes No cross platform support No roles or privileges are supported …but it’s nicer than an XML file.

Is Compact Edition Worthy? Asked at “Has anyone used (or considered using) SQL Server Compact Edition 3.5?”

Votes of Confidence "At work, we recently had to migrate a project that was designed for SQL Server Express to SQLCE. Once we started digging into it though, and saw what it DOES offer, we were convinced it was the right move. It supports LINQ, querying a lot of data [was] MUCH quicker than we thought it would” - BFree “I currently use SQL CE with NHibernate in a business application where the SQL CE database gets synchronized with Sync Framework via WCF to an SQL 2008 server. Works like a charm! especially generating the database from Nhibernate - mapping files [are] just awesome.“ - jkersch

More Demonstrations Demo Create a Compact Edition Database – With Visual Studio – With C#

Advanced Entity Framework Demos: – Concurrency – Many to Many – Table Per Type Grand Finale

Further Reading SQL Compact Edition Homepage Introduction to SQL Compact Edition Download SQL CE af6ca20946c3&displaylang=en Introduction to the Entity Framework (Wildermuth) ADO.net Entity Framework Overview (MSDN)

Fin Rob Sanders Twitter: AusRob Matt Lynch