Last, the topic of building n-tier applications was discussed as used with LINQ to SQL. The key to using
LINQ to SQL in an n-tier environment is utilizing multiple DataContext instances and taking advantage
of the Attach method to efficiently span between the different DataContexts.
310
Appendixes
Appendix A: Case Study
Appendix B: LINQ to Entities: The ADO.NET Entity Framework
Appendix C: C LINQ to XSD
Case Study
Several years ago, Microsoft put out a demo application called Fabrikam (for the fictional
company Fabrikam Fine Furniture) that was used quite heavily. It was a reference application
for developers of Mobile PC applications and solutions, but it also had a server piece that tracked
products and orders.
Well, it??™s time to dust off that old application and upgrade it to work with LINQ. If you have ever
used Fabrikam, you know it is quite large because it deals with mobile components, SQL replication,
and other technology components. This case study won??™t upgrade all of the application but will
redo a portion that deals with Fabrikam??™s fine products, such as tracking (adding, updating, and
deleting) products??”enough to show you what you can do with a great new technology and a new
or existing application.
Pages:
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490