Optimization

main
Inga 🏳‍🌈 15 years ago
parent 57d98db332
commit 82d1227218
  1. 4
      Common/dataobjects/Board.cs
  2. 8
      Common/dataobjects/Category.cs

@ -153,7 +153,7 @@ namespace FLocal.Common.dataobjects {
from id in Cache<IEnumerable<int>>.instance.get(
this.subBoards_Locker,
() => {
IEnumerable<int> ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions(
IEnumerable<int> 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;
}

@ -55,11 +55,11 @@ namespace FLocal.Common.dataobjects {
from id in Cache<IEnumerable<int>>.instance.get(
allCategories_Locker,
() => {
IEnumerable<int> ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions(
IEnumerable<int> 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<IEnumerable<int>>.instance.get(
this.subBoards_Locker,
() => {
IEnumerable<int> ids = from stringId in Config.instance.mainConnection.LoadIdsByConditions(
IEnumerable<int> 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;
}

Loading…
Cancel
Save