示例#1
0
        public bool Commit()
        {
            if (_notifications.HasNotifications())
            {
                return(false);
            }
            var commitResponse = _uow.Commit();

            //report messages from the commit, Include Info and warnings in the event of success
            Bus.RaiseOnResponse(commitResponse, "Commit");

            if (commitResponse.Success)
            {
                return(true);
            }

            Bus.RaiseEvent(new DomainNotification(EventType.Error, "Commit", "We had a problem during saving your data."));
            return(false);
        }