Database Reference
In-Depth Information
if (payment == null)
{
/**
* Walk through the details object
* Using Reflection
* ***/
Payment newPayment = new Payment(); //
Create a new payment row
Also, notice that a newPayment object was created to create a row in the database. This
is some of the generated code from EF that already has mapping to the tables created
through the Visual Studio wizard. It's nice not to have to create your own objects, but just
to call the objects that match the database rows that were created with the Visual Studio
ADO Entity class creation tools. The code, in the Where command, will find any match-
ing EventIds keys matching the selected messages.
NServiceBus does not currently officially integrate into Entity Framework but uses
NHibernate instead as a mapper to the SQL databases and creates the mapping for NSer-
viceBus. There are people working in developing code who are starting to use Entity
Framework as a persister, such as in a saga persister example at https://github.com/Meksi/
NServiceBus.Persistence . However, almost every developer who executes MVC and C#
has heard of, if not developed in, Entity Framework to some degree as it follows the Mi-
crosoft best practices in C# development.
Also, if you look in the examples discussed thus far, the Fluent API's lambda expression is
used throughout NServiceBus. We can see it in pieces when we called Unobtrus-
iveMessageConventions :
class UnobtrusiveMessageConventions :
IWantToRunBeforeConfiguration
{
public void Init()
{
Configure.Instance
.DefiningCommandsAs(t => t.Namespace
!= null && t.Namespace.StartsWith("VideoStore") &&
t.Namespace.EndsWith("Commands"))
.DefiningEventsAs(t => t.Namespace !=
null && t.Namespace.StartsWith("VideoStore") &&
Search WWH ::




Custom Search