コード例 #1
0
        public async Task <string> GetStringAsync(string command, Action <NpgsqlParameterCollection> parameters, bool fromRecordSet = false)
        {
            connection.Notice += loggingService.CreateNoticeEventHandler(command);
            await EnsureConnectionIsOpen();

            using (var cmd = new NpgsqlCommand(command, connection))
            {
                parameters?.Invoke(cmd.Parameters);
                return(await GetStringContentFromCommand(cmd, fromRecordSet));
            }
        }