public bool ExistsInDb(IDbConnectionAbstraction connectionAbstraction)
{
SqlCommand checkExistsSqlCommand = new SqlCommand(CheckParameterExists, connectionAbstraction.Connection);
checkExistsSqlCommand.Parameters.Add(IdSqlParameter);
connectionAbstraction.Open();
int numberOfItems = (int)checkExistsSqlCommand.ExecuteScalar();
connectionAbstraction.Close();
if (numberOfItems > 0)
{
return true;
}
else
{
return false;
}
}