Beispiel #1
0
 static void Main(string[] args)
 {
     var ncustomer = new Customer { Id = 2, name = "Steve" };
     IBus bus = CreateBusCore();
     bus.Publish<ICustomerAddedEvent>(customerCreatedEvent => customerCreatedEvent.Customer = ncustomer);
     Console.WriteLine("Message Published");
 }
Beispiel #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     try {
         Customer cust = new Model.Model.Customer();
         cust.FName     = txtFName.Text;
         cust.LName     = txtLName.Text;
         cust.Address   = txtAddress.Text;
         cust.Email     = txtEmail.Text;
         cust.Telephone = txttelephone.Text;
         SaveCustomer(cust);
     } catch (Exception ex)
     {
         log.Error(ex.StackTrace);
     }
 }