When we originally created our Session object and wrote a couple of queries in Chapter 5, The Session Procession, we created all of our code inline. While this works for a simple sample, in a real application we don't want to embed this logic with our application logic, for a number of reasons.
Embedding our data access logic inside our application presents a few issues. Firstly, if we have our queries in the application, we can't reuse them in other applications without copying them. Second, by decoupling our presentation layer from our data layer, we can take advantage of technologies such as Silverlight and WPF more readily by using web services. Additionally, if we make any changes to our data layer, we would have to go back several places and change it in each place, instead of just fixing it in the data layer.