public bool OnCustomerDetailChanged(OnCustomerDetailChanged ev) { ILogger logger = IoC.Container.Resolve <ILogger>(); logger.Info("OnCustomerDetailChanged, detail:{0}", JsonHelper.ToJson(ev)); return(true); }
public void Execute(OnCustomerDetailChanged ev) { using (IUnitOfWork uow = new UnitOfWork(RepositoryType.MongoDb)) { IOrderQuery query = IoC.Container.Resolve <IOrderQuery>(uow); App.Query.Entity.Order.Order order = query.GetByOrderId(ev.OrderId); order.Name = ev.CustomerName; query.Update(order); uow.Commit(); } }