public bool Commit() { if (_notifications.HasNotificationsWithKey("Error")) { return(false); } if (_unityOfWork.SaveAndCommit() > 0) { return(true); } _notifications.Handle(new DomainNotification("Error", "We had a problem during saving your data.")); return(false); }