PacktLib: WCF 4.5 Multi-Layer Services Development with Entity Framework

WCF 4.5 Multi-Layer Services Development with Entity Framework


About the Author

About the Reviewers


Web Services and Windows Communication Foundation

What is SOA?

Web services

Web services: standards and specifications

Windows Communication Foundation (WCF)

WCF production and development environments


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 IIS Express

Creating a client to consume the WCF service


Hosting and Debugging the HelloWorld WCF Service

Hosting the HelloWorld WCF service

Debugging the HelloWorld WCF service


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


Adding Database Support and Exception Handling

Adding a data access layer

Adding error handling to the service


LINQ: Language Integrated Query

What is LINQ?

Creating the test solution and project

Datatype 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


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 a database table

Viewing generated SQL statements

Deferred execution

Deferred (lazy) loading versus eager loading

Joining two tables

Querying a view


LINQ to Entities: Advanced Concepts and Features

Calling a stored procedure


Handling simultaneous (concurrent) updates

Transaction support


Applying LINQ to Entities to a WCF Service

Creating the LINQNorthwind solution

Modeling the Northwind database

Creating the business domain object project

Using LINQ to Entities in the data access layer

Creating the business logic layer

Creating the service interface layer

Testing the service with the WCF Test Client

Testing concurrency with our own client


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

Tradeoffs of distributed transactions


WCF Security

WCF security components

Hosting a WCF service using Basic Authentication

Hosting a WCF service with Windows Authentication

WCF Security Guidance


Extending WCF Services

WCF runtime architecture

Why extend WCF services?

WCF extension points

Extending a WCF service

Extending HelloWorldService