Wiki

Clone wiki

wcf-example-app / Home

Summary

A sample app I wrote a job interview a while back. I'm placing this here to share with a colleague (and of course, you). It's here to illustrate a very simple WCF service.

Requirements

WCF Programming Audition

For this exercise, you will be designing and implementing a service using WCF that maintains the roster for a hockey team.

The following information needs to be maintained for each player on the team: Name Number Position (left wing, center, right wing, defense, goalie) Number of games played Number of goals scored Number of assists

In addition, for goalies, the following statistics need to be maintained: Number of saves Number of goals allowed

The service should provide the following operations: Add a player Remove a player Get all of the information for a player, given the player’s number Update statistics for a player after the end of a game Return a list of all the players currently on the team

The focus of this assignment is WCF, so we’ll simplify things in a few areas: Do not implement a database as part of your solution. Simply use whatever data structures you think are best for maintaining this information in memory. However, design your implementation so that it would be easy to replace the use of data structures with a database at some point in the future. A simple console application will do for the client. A graphical UI is not necessary.

Your client should make the following calls, in the order listed below. Any results should be written to the console: Add a player: Eric Staal, number 12, center Add a player: Ray Whitney, number 13, left wing Add a player: Scott Walker, number 24, right wing Add a player: David Tanabe, number 45, defense Add a player: Casey Borer, number 53, defense Add a player: Tim Gleason, number 42, defense Add a player: Cam Ward, number 30, goalie Remove a player: number 45 Return a list of all players Update statistics: number 24, 1 goal, 0 assists Update statistics: number 42, 0 goals, 1 assist Update statistics: number 30, 0 goals, 1 assist, 27 saves, 0 goals allowed Get information for player: number 12 Get information for player: number 24 Get information for player: number 30

You should submit all of the files in your solution in a zip file and rename the file extension to “.zzz” so that the attachment does not get dropped by our Exchange server. Also include the amount of time you spent on the solution.

Updated