Blacker.MangaScraper.Library.DAL.StorageDAL.GetChaptersInfo C# (CSharp) Method

GetChaptersInfo() private method

private GetChaptersInfo ( string condition, object>.IEnumerable parameters ) : IEnumerable
condition string
parameters object>.IEnumerable
return IEnumerable
        private IEnumerable<DownloadedChapterInfo> GetChaptersInfo(string condition, IEnumerable<KeyValuePair<string, object>> parameters)
        {
            string sql = BaseSelect + (String.IsNullOrEmpty(condition) ? String.Empty : "WHERE " + condition);

            using (var connection = GetConnection())
            using (var command = GetTextCommand(sql))
            {
                foreach (var parameter in parameters)
                {
                    command.Parameters.AddWithValue(parameter.Key, parameter.Value);
                }

                var table = ExecuteDataTable(command, connection);

                if (table == null)
                    return Enumerable.Empty<DownloadedChapterInfo>();

                return (from DataRow row in table.Rows
                        select LoadDownloadInfoFromDataRow(row, LoadChapterFromDataRow(row))
                       ).ToList();
            }
        }

Same methods

StorageDAL::GetChaptersInfo ( ) : IEnumerable
StorageDAL::GetChaptersInfo ( System.DateTime newerThan ) : IEnumerable
StorageDAL::GetChaptersInfo ( IMangaRecord mangaRecord ) : IEnumerable
StorageDAL::GetChaptersInfo ( string search ) : IEnumerable