From 82d12272185841bce95f6138878c473acb72dde9 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 31 Aug 2010 19:55:32 +0000 Subject: [PATCH] Optimization --- Common/dataobjects/Board.cs | 4 ++-- Common/dataobjects/Category.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Common/dataobjects/Board.cs b/Common/dataobjects/Board.cs index 0504c00..b27e2b9 100644 --- a/Common/dataobjects/Board.cs +++ b/Common/dataobjects/Board.cs @@ -153,7 +153,7 @@ namespace FLocal.Common.dataobjects { from id in Cache>.instance.get( this.subBoards_Locker, () => { - IEnumerable ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions( + IEnumerable ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions( TableSpec.instance, new FLocal.Core.DB.conditions.ComparisonCondition( TableSpec.instance.getColumnSpec(Board.TableSpec.FIELD_PARENTBOARDID), @@ -161,7 +161,7 @@ namespace FLocal.Common.dataobjects { this.id.ToString() ), Diapasone.unlimited - ) select int.Parse(stringId); + ) select int.Parse(stringId)).ToList(); Board.LoadByIds(ids); return ids; } diff --git a/Common/dataobjects/Category.cs b/Common/dataobjects/Category.cs index e93001a..181313c 100644 --- a/Common/dataobjects/Category.cs +++ b/Common/dataobjects/Category.cs @@ -55,11 +55,11 @@ namespace FLocal.Common.dataobjects { from id in Cache>.instance.get( allCategories_Locker, () => { - IEnumerable ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions( + IEnumerable ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions( TableSpec.instance, new FLocal.Core.DB.conditions.EmptyCondition(), Diapasone.unlimited - ) select int.Parse(stringId); + ) select int.Parse(stringId)).ToList(); Category.LoadByIds(ids); return ids; } @@ -80,7 +80,7 @@ namespace FLocal.Common.dataobjects { from id in Cache>.instance.get( this.subBoards_Locker, () => { - IEnumerable ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions( + IEnumerable ids = (from stringId in Config.instance.mainConnection.LoadIdsByConditions( Board.TableSpec.instance, new FLocal.Core.DB.conditions.ComparisonCondition( Board.TableSpec.instance.getColumnSpec(Board.TableSpec.FIELD_CATEGORYID), @@ -88,7 +88,7 @@ namespace FLocal.Common.dataobjects { this.id.ToString() ), Diapasone.unlimited - ) select int.Parse(stringId); + ) select int.Parse(stringId)).ToList(); Board.LoadByIds(ids); return ids; }