Blacker.MangaScraper.Library.DAL.StorageDAL.RemoveDownloadInfo C# (CSharp) Метод

RemoveDownloadInfo() публичный Метод

public RemoveDownloadInfo ( string chapterId ) : bool
chapterId string
Результат bool
        public bool RemoveDownloadInfo(string chapterId)
        {
            if (String.IsNullOrEmpty(chapterId))
                throw new ArgumentException("Chapter id must not be null or empty.", "chapterId");

            const string sql = @"DELETE FROM Chapters WHERE ChapterId=@ChapterId";

            using (var connection = GetConnection())
            using (var command = GetTextCommand(sql))
            {
                command.Parameters.AddWithValue("@ChapterId", chapterId);

                return ExecuteNonQuery(command, connection) > 0;
            }
        }