SlideShare a Scribd company logo
Local Database Caching with the Microsoft Sync Framework
presented to NUFWon 11/10/2009

DESIGNING APPLICATIONS FOR
THE OCCASIONALLY CONNECTED
SCENARIO
About Me
 Work for Systemental, Inc as a Consultant
  and Software Developer
 Software development to support Corporate
  business process improvement since 2000
  (Lean or Continuous Improvement Initiatives)
   .Net since 2004
 President, fwPASS.org
 Mfg. Eng. Technology degrees from Ball State
  University
A case study in failure

 What could go wrong preparing this
  presentation did
   Initial demo worked in minutes (after about three
    minor problems)
   SQL CE debugging challenges
  1. Refactor - created numerous problems
  2. Test - find problems requiring schema changes
  3. Repeat 1-2 ad nauseum
What we will cover

 What is the Microsoft Sync Framework?
 How you can use it?
 Why?
 How does it work?
 How do you implement it?
   Demo’s
 Gotcha’s, gotcha’s, and debugging
What is the Sync Framework

 Provider-based API for synchronizing data or
  files across multiple applications, services,
  and physical devices
 Included providers
   Database *
   File system
   Web – RSS/Atom
How can it be used?

 Server to Local
 Local to Server
 Bi-directional
Why?

 Why not pub/sub, log shipping, replication?
   Reliability
   Purpose
   schedule granularity
 Disconnected, hello….
 Argument: Internet is everywhere and growing
 CE vs. Express
   Encrypt or password protect the file
   Document-safe, no code stored in file
   Light 1.8Mb vs. 58Mb
How does it work?

 Visual Studio local database cache template
 Schema changes (couple fields and
  tombstone)
 Triggers or 2008 Change data capture
Sync Process
Steps to Implement

 Add new item - local database cache
 Create database/tables to sync or modify DDL
 Sync Configuration wizard
     Configure source/target databases
     add/edit .sdf database
     add sync tables
     Generate/run scripts to adjust ddl/sync
     Generate typed dataset/table adapters (optional)
 Generate Linq2SQL or EF classes (optional)
 Set sync direction and .Synchronize
Demo project
Keyboard Encoder Module
Demo project details

 WPF application with a single keystroke input
  F5 key
 Changing background color (green, yellow,
  red) based on actual count vs. target count
 Two dispatcher timers:
  1. Screen display color update (every second)
  2. Db synchronization (every minute)
 WinForm SQL CE cache table viewer
 Using Repository pattern and Linq to SQL
Demos

 Existing SQL db, switch to CE 3.5 using
    provider and connection string change
   Wizardry
   SQLMetal
   Profiler
   Server to local sync (default)
   local to server sync/bi-directional (code-
    behind)
SQLMetal to create Linq2SQL
classes
Gotcha’s
 Visual Studio Linq2SQL template doesn’t support SQL CE
   provider – use SQLMetal to generate, then include in project
 LINQ dbml created from MSSQL, not compatible CE
 SSMS 2005 would not open a CE 3.5 .sdf file. Need SSMS 2008
 Set sync direction if anything other than server to local
 Changing schema’s after generation – remove everything and
   start over (use sql scripts to roll back)
 Insert/Update triggers not auto created?
 .sdf is re-initialized to empty and copied to bin/debug if newer
 Existing triggers on the table
Gotcha’s – primary key

 Primary key defined on table to cache
 auto-incrementing integer primary key,
  unique identity with SQL CE db
 Some table defaults like newid() for
  MSSQL Uniqueidentifer field do not
  transfer to the .sdf schema definition. Set
  in code <table>.id=Guid.NewGuid
 Linq can’t autogenerate guid on server.
  Use id=Guid.NewGuid in code
Debugging SQL CE 3.5
•   SSMS 2005 gives the following error when you try to connect to a SQL CE 3.5 .sdf file.
•   Created a WinForm project PeekLocalCache to display data from .sdf file. Caution: make sure
    you know which .sdf file the app is using (bin/debug, bin/release, project)
•   SSMS 2008 – hopefully works
•   Be careful re-creating the .sdf file using the local database cache configuration wizard
    without deleting the records from the Server table.

                                                       I cleared out the Server table and ran for
                                                       a while on 11/2 without ex, on 11/3
                                                       cleared out the table and ran for 13
                                                       records. Changing to update server
                                                       table, works. Violation is in local cache
                                                       db
Switched PK to GUID from
Int64
Set autogen=true in dbml:
fail!
added id = Guid.NewGuid
Conflict resolution
 Sorry, not covering in Demos
 Enums – conflict types (between sync sessions)
    ClientInsertServerInsert - A new row is created with the same
       primary key.
      ClientUpdateServerUpdate - The same row is updated. Most
       common
      ClientUpdateServerDelete - A row is updated on the client but
       was deleted on the server.
      ClientDeleteServerUpdate - A row is deleted on the client but
       was updated on the server.
      ErrorsOccurred – all others
 Methods for handling
    Continue
    RetryApplyingRow
    RetryWithForceWrite
Resolution Policies

 Source wins
 Destination wins
 Specified replica wins
 Last writer wins
 Merge
 Log it or defer
References
   http://dean-o.blogspot.com/
   http://channel9.msdn.com/posts/funkyonex/Offline-Data-Synchronization-Services-in-Visual-
    Studio-2008/
   http://videoworld-rong.blogspot.com/2009/10/adonet-sync-services.html
   http://social.microsoft.com/Forums/en-US/uklaunch2007ado.net/thread/0fd34e49-ae3d-4b50-
    91f5-5e24d4a0b145
   http://skysigal.xact-solutions.com/Blog/tabid/427/EntryId/898/Using-LinqToSQL-with-SqlServer-
    Compact.aspx
   http://download.microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D-
    F02ADE638EBE/Compact_Express_Comparison.doc
   http://www.developer.com/net/article.php/3815506/Handling-Data-Conflicts-in-the-Microsoft-
    Sync-Framework.htm
   http://www.geekzone.co.nz/JamesHip/6568
   http://code.msdn.microsoft.com/sync
   http://mattgoebel.spaces.live.com/blog/cns!DB12DAA600AD8227!182.entry?wa=wsignin1.0&sa=
    84900002
   http://devlicio.us/blogs/billy_mccafferty/archive/2009/11/09/dependency-injection-101.aspx
   http://stackoverflow.com/questions/385796/sync-framework-can-i-sync-only-a-subset-of-my-
    tables
   ASP.NET MVC Framework Unleashed by Stephen Walther, SAMS, ISBN 978-0-672-32998-2
Thank you!

 Website
   http://www.systemental.com
 Blogs
   http://dean-o.blogspot.com/
   http://practicalhoshin.blogspot.com
 Twitter
   http://www.twitter.com/deanwillson
 Email
   dean@systemental.com
 LinkedIn
   http://www.linkedin.com/in/deanwillson

More Related Content

What's hot (20)

PDF
Cloud Based Data Warehousing and Analytics
Seeling Cheung
 
PDF
Why advanced monitoring is key for healthy
Denodo
 
PPTX
2012 10 bigdata_overview
jdijcks
 
PPTX
SQL Server Disaster Recovery Implementation
Syed Jahanzaib Bin Hassan - JBH Syed
 
PDF
Testing Strategies for Data Lake Hosted on Hadoop
CitiusTech
 
PPT
DATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAINING
Datawarehouse Trainings
 
PDF
An introduction to data virtualization in business intelligence
David Walker
 
PDF
Enabling Data as a Service with the JBoss Enterprise Data Services Platform
prajods
 
PPTX
Introduction to Microsoft’s Master Data Services (MDS)
James Serra
 
PPTX
Agile Methods and Data Warehousing (2016 update)
Kent Graziano
 
PPT
DW 101
jeffd00
 
PDF
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo
 
PPTX
Information Virtualization: Query Federation on Data Lakes
DataWorks Summit
 
PDF
2014.07.11 biginsights data2014
Wilfried Hoge
 
PDF
Service Mesh Talk for CTO Forum
Rick Hightower
 
PPTX
Data vault what's Next: Part 2
Empowered Holdings, LLC
 
PPT
Big data insights with Red Hat JBoss Data Virtualization
Kenneth Peeples
 
PDF
Data Lake - Multitenancy Best Practices
CitiusTech
 
PDF
Understanding Metadata: Why it's essential to your big data solution and how ...
Zaloni
 
PPTX
From Traditional Data Warehouse To Real Time Data Warehouse
Osama Hussein
 
Cloud Based Data Warehousing and Analytics
Seeling Cheung
 
Why advanced monitoring is key for healthy
Denodo
 
2012 10 bigdata_overview
jdijcks
 
SQL Server Disaster Recovery Implementation
Syed Jahanzaib Bin Hassan - JBH Syed
 
Testing Strategies for Data Lake Hosted on Hadoop
CitiusTech
 
DATASTAGE AND QUALITY STAGE 9.1 ONLINE TRAINING
Datawarehouse Trainings
 
An introduction to data virtualization in business intelligence
David Walker
 
Enabling Data as a Service with the JBoss Enterprise Data Services Platform
prajods
 
Introduction to Microsoft’s Master Data Services (MDS)
James Serra
 
Agile Methods and Data Warehousing (2016 update)
Kent Graziano
 
DW 101
jeffd00
 
Denodo Data Virtualization Platform: Scalability (session 3 from Architect to...
Denodo
 
Information Virtualization: Query Federation on Data Lakes
DataWorks Summit
 
2014.07.11 biginsights data2014
Wilfried Hoge
 
Service Mesh Talk for CTO Forum
Rick Hightower
 
Data vault what's Next: Part 2
Empowered Holdings, LLC
 
Big data insights with Red Hat JBoss Data Virtualization
Kenneth Peeples
 
Data Lake - Multitenancy Best Practices
CitiusTech
 
Understanding Metadata: Why it's essential to your big data solution and how ...
Zaloni
 
From Traditional Data Warehouse To Real Time Data Warehouse
Osama Hussein
 

Similar to Designing For Occasionally Connected Apps Slideshare (20)

PPSX
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
ABTO Software
 
PPTX
Occasionally Connected Systems
rsnarayanan
 
PPT
Planning for Synchronization with Browser-Local Databases
ZendCon
 
PDF
Two way data sync between legacy and your brand new micro-service architecture
bleporini
 
PPT
Introduction To .Net Compact Framework and SQL Server CE Development
christopherfairbairn
 
PDF
Overcoming the Top Four Challenges to Real-Time Performance in Large-Scale, D...
SL Corporation
 
PPTX
Mobile app master class - Session 2.pptx
Hathimary A
 
PDF
Sql server difference faqs- 7
Umar Ali
 
PPTX
Real World Performance - OLTP
Connor McDonald
 
PDF
Database Change Management | Change Manager 5.1 Beta
Michael Findling
 
PDF
Overcoming the Top Four Challenges to Real‐Time Performance in Large‐Scale, D...
SL Corporation
 
PPSX
Microsoft Sync Framework (part 2) ABTO Software Lecture Garntsarik
ABTO Software
 
PDF
Building and deploying large scale real time news system with my sql and dist...
Tao Cheng
 
PPTX
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
sameh samir
 
PPTX
Building scalable application with sql server
Chris Adkin
 
PPTX
SQL Server - High availability
Peter Gfader
 
PDF
Tips and Tricks for SAP Sybase ASE
Don Brizendine
 
PPT
SQL Server 2008 for Developers
ukdpe
 
PDF
Novell Identity Manager Tips, Tricks and Best Practices
Novell
 
PPTX
Microsoft SQL Server 2012
Dhiren Gala
 
Microsoft Sync Framework (part 1) ABTO Software Lecture Garntsarik
ABTO Software
 
Occasionally Connected Systems
rsnarayanan
 
Planning for Synchronization with Browser-Local Databases
ZendCon
 
Two way data sync between legacy and your brand new micro-service architecture
bleporini
 
Introduction To .Net Compact Framework and SQL Server CE Development
christopherfairbairn
 
Overcoming the Top Four Challenges to Real-Time Performance in Large-Scale, D...
SL Corporation
 
Mobile app master class - Session 2.pptx
Hathimary A
 
Sql server difference faqs- 7
Umar Ali
 
Real World Performance - OLTP
Connor McDonald
 
Database Change Management | Change Manager 5.1 Beta
Michael Findling
 
Overcoming the Top Four Challenges to Real‐Time Performance in Large‐Scale, D...
SL Corporation
 
Microsoft Sync Framework (part 2) ABTO Software Lecture Garntsarik
ABTO Software
 
Building and deploying large scale real time news system with my sql and dist...
Tao Cheng
 
MSF: Sync your Data On-Premises And To The Cloud - dotNetwork Gathering, Oct ...
sameh samir
 
Building scalable application with sql server
Chris Adkin
 
SQL Server - High availability
Peter Gfader
 
Tips and Tricks for SAP Sybase ASE
Don Brizendine
 
SQL Server 2008 for Developers
ukdpe
 
Novell Identity Manager Tips, Tricks and Best Practices
Novell
 
Microsoft SQL Server 2012
Dhiren Gala
 
Ad

More from Dean Willson (12)

PPTX
Intro to the Internet of Things using Netduino
Dean Willson
 
PPTX
Index Reorganization and Rebuilding for Success
Dean Willson
 
PPTX
Automating sql server daily health checks
Dean Willson
 
PPTX
Visual Studio 2012 Productivity Tools
Dean Willson
 
PPTX
Intro to Powershell
Dean Willson
 
PDF
Continuous improvement in a professional organization
Dean Willson
 
PDF
Database Source Control
Dean Willson
 
PPTX
Career Transitions - Ball State University, Six Sigma Speakers Series
Dean Willson
 
PPTX
Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Dean Willson
 
PPT
Implementing ASP.NET Role Based Security
Dean Willson
 
PPTX
Introduction to SSRS Report Builder
Dean Willson
 
PDF
Data Mining with SQL Server 2005
Dean Willson
 
Intro to the Internet of Things using Netduino
Dean Willson
 
Index Reorganization and Rebuilding for Success
Dean Willson
 
Automating sql server daily health checks
Dean Willson
 
Visual Studio 2012 Productivity Tools
Dean Willson
 
Intro to Powershell
Dean Willson
 
Continuous improvement in a professional organization
Dean Willson
 
Database Source Control
Dean Willson
 
Career Transitions - Ball State University, Six Sigma Speakers Series
Dean Willson
 
Introduction to SQL Server 2008 Management Data Warehouse (MDW)
Dean Willson
 
Implementing ASP.NET Role Based Security
Dean Willson
 
Introduction to SSRS Report Builder
Dean Willson
 
Data Mining with SQL Server 2005
Dean Willson
 
Ad

Recently uploaded (20)

DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 

Designing For Occasionally Connected Apps Slideshare

  • 1. Local Database Caching with the Microsoft Sync Framework presented to NUFWon 11/10/2009 DESIGNING APPLICATIONS FOR THE OCCASIONALLY CONNECTED SCENARIO
  • 2. About Me  Work for Systemental, Inc as a Consultant and Software Developer  Software development to support Corporate business process improvement since 2000 (Lean or Continuous Improvement Initiatives)  .Net since 2004  President, fwPASS.org  Mfg. Eng. Technology degrees from Ball State University
  • 3. A case study in failure  What could go wrong preparing this presentation did  Initial demo worked in minutes (after about three minor problems)  SQL CE debugging challenges 1. Refactor - created numerous problems 2. Test - find problems requiring schema changes 3. Repeat 1-2 ad nauseum
  • 4. What we will cover  What is the Microsoft Sync Framework?  How you can use it?  Why?  How does it work?  How do you implement it?  Demo’s  Gotcha’s, gotcha’s, and debugging
  • 5. What is the Sync Framework  Provider-based API for synchronizing data or files across multiple applications, services, and physical devices  Included providers  Database *  File system  Web – RSS/Atom
  • 6. How can it be used?  Server to Local  Local to Server  Bi-directional
  • 7. Why?  Why not pub/sub, log shipping, replication?  Reliability  Purpose  schedule granularity  Disconnected, hello….  Argument: Internet is everywhere and growing  CE vs. Express  Encrypt or password protect the file  Document-safe, no code stored in file  Light 1.8Mb vs. 58Mb
  • 8. How does it work?  Visual Studio local database cache template  Schema changes (couple fields and tombstone)  Triggers or 2008 Change data capture
  • 10. Steps to Implement  Add new item - local database cache  Create database/tables to sync or modify DDL  Sync Configuration wizard  Configure source/target databases  add/edit .sdf database  add sync tables  Generate/run scripts to adjust ddl/sync  Generate typed dataset/table adapters (optional)  Generate Linq2SQL or EF classes (optional)  Set sync direction and .Synchronize
  • 13. Demo project details  WPF application with a single keystroke input F5 key  Changing background color (green, yellow, red) based on actual count vs. target count  Two dispatcher timers: 1. Screen display color update (every second) 2. Db synchronization (every minute)  WinForm SQL CE cache table viewer  Using Repository pattern and Linq to SQL
  • 14. Demos  Existing SQL db, switch to CE 3.5 using provider and connection string change  Wizardry  SQLMetal  Profiler  Server to local sync (default)  local to server sync/bi-directional (code- behind)
  • 15. SQLMetal to create Linq2SQL classes
  • 16. Gotcha’s  Visual Studio Linq2SQL template doesn’t support SQL CE provider – use SQLMetal to generate, then include in project  LINQ dbml created from MSSQL, not compatible CE  SSMS 2005 would not open a CE 3.5 .sdf file. Need SSMS 2008  Set sync direction if anything other than server to local  Changing schema’s after generation – remove everything and start over (use sql scripts to roll back)  Insert/Update triggers not auto created?  .sdf is re-initialized to empty and copied to bin/debug if newer  Existing triggers on the table
  • 17. Gotcha’s – primary key  Primary key defined on table to cache  auto-incrementing integer primary key, unique identity with SQL CE db  Some table defaults like newid() for MSSQL Uniqueidentifer field do not transfer to the .sdf schema definition. Set in code <table>.id=Guid.NewGuid  Linq can’t autogenerate guid on server. Use id=Guid.NewGuid in code
  • 18. Debugging SQL CE 3.5 • SSMS 2005 gives the following error when you try to connect to a SQL CE 3.5 .sdf file. • Created a WinForm project PeekLocalCache to display data from .sdf file. Caution: make sure you know which .sdf file the app is using (bin/debug, bin/release, project) • SSMS 2008 – hopefully works • Be careful re-creating the .sdf file using the local database cache configuration wizard without deleting the records from the Server table. I cleared out the Server table and ran for a while on 11/2 without ex, on 11/3 cleared out the table and ran for 13 records. Changing to update server table, works. Violation is in local cache db
  • 19. Switched PK to GUID from Int64
  • 20. Set autogen=true in dbml: fail!
  • 21. added id = Guid.NewGuid
  • 22. Conflict resolution  Sorry, not covering in Demos  Enums – conflict types (between sync sessions)  ClientInsertServerInsert - A new row is created with the same primary key.  ClientUpdateServerUpdate - The same row is updated. Most common  ClientUpdateServerDelete - A row is updated on the client but was deleted on the server.  ClientDeleteServerUpdate - A row is deleted on the client but was updated on the server.  ErrorsOccurred – all others  Methods for handling  Continue  RetryApplyingRow  RetryWithForceWrite
  • 23. Resolution Policies  Source wins  Destination wins  Specified replica wins  Last writer wins  Merge  Log it or defer
  • 24. References  http://dean-o.blogspot.com/  http://channel9.msdn.com/posts/funkyonex/Offline-Data-Synchronization-Services-in-Visual- Studio-2008/  http://videoworld-rong.blogspot.com/2009/10/adonet-sync-services.html  http://social.microsoft.com/Forums/en-US/uklaunch2007ado.net/thread/0fd34e49-ae3d-4b50- 91f5-5e24d4a0b145  http://skysigal.xact-solutions.com/Blog/tabid/427/EntryId/898/Using-LinqToSQL-with-SqlServer- Compact.aspx  http://download.microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D- F02ADE638EBE/Compact_Express_Comparison.doc  http://www.developer.com/net/article.php/3815506/Handling-Data-Conflicts-in-the-Microsoft- Sync-Framework.htm  http://www.geekzone.co.nz/JamesHip/6568  http://code.msdn.microsoft.com/sync  http://mattgoebel.spaces.live.com/blog/cns!DB12DAA600AD8227!182.entry?wa=wsignin1.0&sa= 84900002  http://devlicio.us/blogs/billy_mccafferty/archive/2009/11/09/dependency-injection-101.aspx  http://stackoverflow.com/questions/385796/sync-framework-can-i-sync-only-a-subset-of-my- tables  ASP.NET MVC Framework Unleashed by Stephen Walther, SAMS, ISBN 978-0-672-32998-2
  • 25. Thank you!  Website  http://www.systemental.com  Blogs  http://dean-o.blogspot.com/  http://practicalhoshin.blogspot.com  Twitter  http://www.twitter.com/deanwillson  Email  [email protected]  LinkedIn  http://www.linkedin.com/in/deanwillson

Editor's Notes

  • #4: SQL CE – winform db reader or SSMS 2008
  • #9: Show scripts or look at triggers in db. Homework assignment: See how SS knows the .sdf has changes to upload to server. No SS 2008 to look at the schema or attach to Profiler.
  • #10: SQL Profiler
  • #18: Auto-incrementing integer can cause inserting into client and server with the same primary key
  • #19: I was using bigint as the PK, Unique Identifier. This led to intermittent results. Use Guid instead. Apparently SQL CE *doesn’t* support server generated ID’s.