diff --git a/Test.GBase/GBaseIntegrationTest/GBaseIntegrationTest.cs b/Test.GBase/GBaseIntegrationTest/GBaseIntegrationTest.cs index 50a8541..e503539 100644 --- a/Test.GBase/GBaseIntegrationTest/GBaseIntegrationTest.cs +++ b/Test.GBase/GBaseIntegrationTest/GBaseIntegrationTest.cs @@ -48,9 +48,9 @@ namespace Test.GBase.GBaseIntegrationTest await model.AddItem(new Item("Item 2", 2), _cancellationTokenSource.Token); await model.AddItem(new Item("Item 3", 3), _cancellationTokenSource.Token); - await model.AddGroup(new Group(1), _cancellationTokenSource.Token); - await model.AddGroup(new Group(2), _cancellationTokenSource.Token); - await model.AddGroup(new Group(3), _cancellationTokenSource.Token); + await model.AddGroup(new Group(1) {Items = { model.Items[0], model.Items[1] }}, _cancellationTokenSource.Token); + await model.AddGroup(new Group(2) {Items = { model.Items[1], model.Items[2] }}, _cancellationTokenSource.Token); + await model.AddGroup(new Group(3) {Items = { model.Items[0], model.Items[2] }}, _cancellationTokenSource.Token); } } } \ No newline at end of file diff --git a/Test.GBase/GBaseIntegrationTest/Group.cs b/Test.GBase/GBaseIntegrationTest/Group.cs index 970712f..7917268 100644 --- a/Test.GBase/GBaseIntegrationTest/Group.cs +++ b/Test.GBase/GBaseIntegrationTest/Group.cs @@ -13,18 +13,21 @@ namespace Test.GBase.GBaseIntegrationTest { public Group() { - Items = new List(); + Items = new List(); } public Group(int number) { Number = number; - Items = new List(); + Items = new List(); } [GBaseColumn] public int Number { get; private set; } - public List Items { get; } + + [GBaseColumn] + public List Items { get; } + public GBaseKey Key { get; set; } public string FileName => $"Group{Number}"; diff --git a/Test.GBase/GBaseIntegrationTest/IGroup.cs b/Test.GBase/GBaseIntegrationTest/IGroup.cs index 848f881..9fc4e1b 100644 --- a/Test.GBase/GBaseIntegrationTest/IGroup.cs +++ b/Test.GBase/GBaseIntegrationTest/IGroup.cs @@ -11,6 +11,6 @@ namespace Test.GBase.GBaseIntegrationTest public interface IGroup : IGBaseObject //: INotifyGBaseEntryChanged { int Number { get; } - List Items { get; } + List Items { get; } } } \ No newline at end of file diff --git a/Test.GBase/GBaseIntegrationTest/Model.cs b/Test.GBase/GBaseIntegrationTest/Model.cs index a446b8f..8ca67de 100644 --- a/Test.GBase/GBaseIntegrationTest/Model.cs +++ b/Test.GBase/GBaseIntegrationTest/Model.cs @@ -19,23 +19,23 @@ namespace Test.GBase.GBaseIntegrationTest public Model(IGBaseFactory gBaseFactory) { _gBase = gBaseFactory.Create(new Settings()); - Items = new List(); - Groups = new List(); + Items = new List(); + Groups = new List(); } - public List Items { get; private set; } - public List Groups { get; private set; } + public List Items { get; private set; } + public List Groups { get; private set; } public async Task Initialize(CancellationToken cancellationToken) { await _gBase.Init("DB", Assembly.GetExecutingAssembly(), cancellationToken); IGBaseTable itemsTable = _gBase.GetTable(); - Items = itemsTable.Entries.Cast().ToList(); + Items = itemsTable.Entries.ToList(); //Items = (await _gBase.GetValues(this, nameof(Items), cancellationToken)).Cast().ToList(); IGBaseTable groupsTable = _gBase.GetTable(); - Groups = groupsTable.Entries.Cast().ToList(); + Groups = groupsTable.Entries.ToList(); //Groups = (await _gBase.GetValues(this, nameof(Groups), cancellationToken)).Cast().ToList(); }