mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
removed code redundancies.
This commit is contained in:
parent
6d3a604677
commit
9a24268ee7
24 changed files with 104 additions and 185 deletions
|
@ -33,17 +33,14 @@ namespace Marr.Data.Converters
|
|||
{
|
||||
return true;
|
||||
}
|
||||
else if (val == "N")
|
||||
if (val == "N")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ConversionException(
|
||||
string.Format(
|
||||
throw new ConversionException(
|
||||
string.Format(
|
||||
"The BooleanYNConverter could not convert the value '{0}' to a boolean.",
|
||||
dbValue));
|
||||
}
|
||||
}
|
||||
|
||||
public object ToDB(object clrValue)
|
||||
|
@ -54,14 +51,11 @@ namespace Marr.Data.Converters
|
|||
{
|
||||
return "Y";
|
||||
}
|
||||
else if (val == false)
|
||||
if (val == false)
|
||||
{
|
||||
return "N";
|
||||
}
|
||||
else
|
||||
{
|
||||
return DBNull.Value;
|
||||
}
|
||||
return DBNull.Value;
|
||||
}
|
||||
|
||||
public Type DbType
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue