Book Image

MASTERING NSERVICEBUS AND PERSISTENCE

By : Richard L Helton
Book Image

MASTERING NSERVICEBUS AND PERSISTENCE

By: Richard L Helton

Overview of this book

Table of Contents (15 chapters)
Mastering NServiceBus and Persistence
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The MVC-EF example


Many C# developers create programs using MVC-EF as defined in Microsoft architecture best practices. We will look at the example enclosed in this book called MVC-SQL with an MVCApp project. This project will read the selected queues from the browser and display what they contain. We will read the available queues in the browser without the need to go through SQL Management Studio.

MVCApp is the main program that runs MVC-EF in SQL Server to view the tables created in the PubSub-SQL solution. However, the PubSub-SQL solution needs to be run first.

These examples were run in VS 2012 in Windows Server 2012, with MSMQ, DTC, NServiceBus references, and SQL Server 2012 Express LocalDB installed.

In order to get access to these tables in the nservicebus database, we need to create objects that map to the tables. In order to do that, we add the ADO.NET Entity Data Model, which will create the mapping to the tables.

A database context will have to be added that will put a connection...