WCF 4.0 Multi-tier Services Development with LINQ to Entities

Build SOA applications on the Microsoft platform with this hands-on WCF 4.0 book and eBook guide updated for VS2010

WCF 4.0 Multi-tier Services Development with LINQ to Entities

Starting
Mike Liu

Build SOA applications on the Microsoft platform with this hands-on WCF 4.0 book and eBook guide updated for VS2010
$29.99
$49.99
RRP $29.99
RRP $49.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849681148
Paperback348 pages

About This Book

  • Master WCF and LINQ to Entities concepts by completing practical examples and applying them to your real-world assignments
  • The first and only book to combine WCF and LINQ to Entities in a multi-tier real-world WCF service
  • Ideal for beginners who want to build scalable, powerful, easy-to-maintain WCF services
  • Rich with example code, clear explanations, interesting examples, and practical advice – a truly hands-on book for C++ and C# developers

Who This Book Is For

This book is for C# and C++ developers who are eager to get started with WCF and LINQ to Entities, and want a book that is practical and rich with examples from the very beginning. Developers and architects evaluating SOA implementation technologies for their company will find this book particularly useful because it gets you started with Microsoft's tools for SOA and shows you how to customize our examples for your prototypes.

This book presumes basic knowledge of C# or C++. Previous experience with Visual Studio will be helpful but is not required, as detailed instructions are given throughout the book.

Table of Contents

Chapter 1: Introducing Web Services and Windows Communication Foundation
What is SOA?
Web services
Web services: standards and specifications
WCF: Windows Communication Foundation
What is WCF?
Why is WCF used for SOA?
WCF architecture
Basic WCF concepts—WCF ABCs
WCF production and development environments
Summary
Chapter 2: Implementing a Basic HelloWorld WCF Service
Creating the HelloWorld solution and project
Creating the HelloWorldService service contract interface
Implementing the HelloWorldService service contract
Hosting the WCF service in ASP.NET Development Server
Creating a client to consume the WCF service
Summary
Chapter 3: Hosting and Debugging the HelloWorld WCF Service
Hosting the HelloWorld WCF service
Debugging the HelloWorld WCF service
Summary
Chapter 4: Implementing a WCF Service in the Real World
Why layer a service?
Creating a new solution and project using WCF templates
Creating the service interface layer
Adding a business logic layer
Summary
Chapter 5: Adding Database Support and Exception Handling to the RealNorthwind WCF Service
Adding a data access layer
Adding error handling to the service
Summary
Chapter 6: LINQ—Language Integrated Query
What is LINQ
Creating the test solution and project
New data type var
Automatic properties
Object initializer
Collection initializer
Anonymous types
Extension methods
Lambda expressions
Built-in LINQ extension methods and method syntax
LINQ query syntax and query expression
Built-in LINQ operators
Summary
Chapter 7: LINQ to Entities: Basic Concepts and Features
ORM—Object-Relational Mapping
Entity Framework
LINQ to Entities
Comparing LINQ to Entities with LINQ to Objects
Comparing LINQ to SQL with LINQ to Entities
Creating a LINQ to Entities test application
Creating the Data Model
Querying and updating the database with a table
View Generated SQL statements
Deferred execution
Deferred (lazy) loading versus eager loading
Joining two tables
Querying a view
Summary
Chapter 8: LINQ to Entities: Advanced Concepts and Features
Calling a stored procedure
Compiled query
Direct SQL
Dynamic query
Inheritance
Handling simultaneous (concurrent) updates
Transaction support
Adding validations to entity classes
Debugging LINQ to Entities programs
Summary
Chapter 9: Applying LINQ to Entities to a WCF Service
Creating the LINQNorthwind solution
Modeling the Northwind database
Copying the connection string to the service layer
Using LINQ to Entities in the data access layer
Adding concurrency support
Testing concurrency with WCF Test Client
Testing concurrency with our own client
Summary
Chapter 10: Distributed Transaction Support of WCF
Creating the DistNorthwind solution
Hosting the WCF service in IIS
Testing the transaction behavior of the WCF service
Enabling distributed transaction support
Understanding the distributed transaction support of a WCF service
Testing the distributed transaction support of the WCF service
Summary

What You Will Learn

  • Create, host, and consume your first WCF service in just a few minutes
  • Explore various hosting and debugging options for a WCF service
  • Build a multi-tier real-world WCF service from scratch to understand every layer of a WCF service and apply it to your real work
  • Add exception handling to your WCF services
  • Understand the basic and advanced concepts and features of LINQ and LINQ to Entities
  • Use LINQ to Entities in the data access layer of a WCF service
  • Control concurrent updates to databases with WCF and LINQ to Entities
  • Add distributed transaction support to your WCF services
  • Test a WCF service from a console program, the VS2010 built-in WCF Test Client, a Windows Form application, and a WPF test client

In Detail

WCF is the Microsoft model for building services, whereas LINQ to Entities is the Microsoft ORM for accessing underlying data storage. Want to learn both? You would normally have to dig through huge reference tomes—so wouldn't you agree that a simple-to-follow practical tutorial on WCF and LINQ to Entities is the way to get ahead?

This book is the quickest and easiest way to learn WCF and LINQ to Entities in Visual Studio 2010. WCF and LINQ to Entities are both powerful yet complex technologies from Microsoft—but you will be surprised at how easily this book will get you get up and running with them.

Mastery of these two topics will quickly enable you to create Service-Oriented applications, and allow you to take your first steps into the world of Service Oriented Architecture without becoming overwhelmed.

Through this book, you will learn what's going on behind the scenes with WCF, and dive into the basic yet most useful techniques for LINQ to Entities. You will develop three real-world multi-tiered WCF services from beginning to end, with LINQ to Entities being used in the data access layer of the services. Various clients including windows console applications, the WCF Test Client, Windows Form applications and WPF applications will be created to test these WCF services. By the end of this book, you will be 100% confident that you know WCF and LINQ to Entities, not only in theory, but with sound real-world experience.

Authors

Table of Contents

Chapter 1: Introducing Web Services and Windows Communication Foundation
What is SOA?
Web services
Web services: standards and specifications
WCF: Windows Communication Foundation
What is WCF?
Why is WCF used for SOA?
WCF architecture
Basic WCF concepts—WCF ABCs
WCF production and development environments
Summary
Chapter 2: Implementing a Basic HelloWorld WCF Service
Creating the HelloWorld solution and project
Creating the HelloWorldService service contract interface
Implementing the HelloWorldService service contract
Hosting the WCF service in ASP.NET Development Server
Creating a client to consume the WCF service
Summary
Chapter 3: Hosting and Debugging the HelloWorld WCF Service
Hosting the HelloWorld WCF service
Debugging the HelloWorld WCF service
Summary
Chapter 4: Implementing a WCF Service in the Real World
Why layer a service?
Creating a new solution and project using WCF templates
Creating the service interface layer
Adding a business logic layer
Summary
Chapter 5: Adding Database Support and Exception Handling to the RealNorthwind WCF Service
Adding a data access layer
Adding error handling to the service
Summary
Chapter 6: LINQ—Language Integrated Query
What is LINQ
Creating the test solution and project
New data type var
Automatic properties
Object initializer
Collection initializer
Anonymous types
Extension methods
Lambda expressions
Built-in LINQ extension methods and method syntax
LINQ query syntax and query expression
Built-in LINQ operators
Summary
Chapter 7: LINQ to Entities: Basic Concepts and Features
ORM—Object-Relational Mapping
Entity Framework
LINQ to Entities
Comparing LINQ to Entities with LINQ to Objects
Comparing LINQ to SQL with LINQ to Entities
Creating a LINQ to Entities test application
Creating the Data Model
Querying and updating the database with a table
View Generated SQL statements
Deferred execution
Deferred (lazy) loading versus eager loading
Joining two tables
Querying a view
Summary
Chapter 8: LINQ to Entities: Advanced Concepts and Features
Calling a stored procedure
Compiled query
Direct SQL
Dynamic query
Inheritance
Handling simultaneous (concurrent) updates
Transaction support
Adding validations to entity classes
Debugging LINQ to Entities programs
Summary
Chapter 9: Applying LINQ to Entities to a WCF Service
Creating the LINQNorthwind solution
Modeling the Northwind database
Copying the connection string to the service layer
Using LINQ to Entities in the data access layer
Adding concurrency support
Testing concurrency with WCF Test Client
Testing concurrency with our own client
Summary
Chapter 10: Distributed Transaction Support of WCF
Creating the DistNorthwind solution
Hosting the WCF service in IIS
Testing the transaction behavior of the WCF service
Enabling distributed transaction support
Understanding the distributed transaction support of a WCF service
Testing the distributed transaction support of the WCF service
Summary

Book Details

ISBN 139781849681148
Paperback348 pages
Read More

Recommended for You

WCF Multi-tier Services Development with LINQ
$ 20.25
Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications
$ 29.99
WCF Multi-layer Services Development with Entity Framework - Fourth Edition
$ 32.99