public NotesController(INotesStorage iNotesStorage) { _iNotesStorage = iNotesStorage; NotesStorage notesStorage = new NotesStorage(); notesStorage.OpenNotes("Storage/Notes.json"); }
public ChatMessageRepository(IOptions <NotesStorage> notesStorage) { _notesStorage = notesStorage.Value ?? throw new ArgumentException(nameof(notesStorage));; var accountName = _notesStorage.AccountName; var accountKey = _notesStorage.AccountKey; _tableName = _notesStorage.TableName; var storageCredentials = new StorageCredentials(accountName, accountKey); var storageAccount = new CloudStorageAccount(storageCredentials, true); _tableClient = storageAccount.CreateCloudTableClient(); }