public AuditViewModel(IAuditRepository repo, IUserNotify notify) { this.repo = repo; this.notify = notify; try { UsersList = repo.AuditLogRepo.GetAllUsers(); searchCommand = ViewModelSource.Create(() => new AuditSearchCommand(this, repo.AuditLogRepo, notify)); } catch(RepositoryException ex) { log.Warn("AuditViewModel " + ex.ToString()); notify.ShowWarning(Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Message), Program.LanguageManager.GetString(StringResources.Notification_Error_Db_Header)); } }
public AuditViewModel(IAuditLogRepository repo) { this.repo = repo; UsersList = repo.GetAllUsers(); searchCommand = ViewModelSource.Create(() => new AuditSearchCommand(this, repo)); }