O'Reilly logo

Mastering LOB Development for Silverlight 5: A Case Study in Action by Rocío Serrano, Braulio Díez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LOB application case study: applying what we have learned

The last step for this chapter is to extend our sample application with some error handling mechanisms. We will use the following approach:

Server side

At the server side, a new table is introduced where we store all the messages. Whenever a new exception is raised, we query if such a record already exists in the database. If not, we generate and fill a new entity. We also use a category value, which identifies if it is a server-side or client-side error.

private static int StoreError(ErrorItem errorItem, int category) { int errorCode = -1; using (BookingsEntities entities = new BookingsEntities()) { // Query if a record exists. Error error = QueryErrorItem(errorItem, category, entities); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required