A database based on .net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1010 B

// Author: Gockner, Simon
// Created: 2020-09-18
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System.Collections.Generic;
using GBase;
using GBase.Attributes;
namespace Test.GBase.GBaseIntegrationTest
{
[GBaseTable("Groups")]
public class Group : IGroup
{
public Group()
{
Items = new List<IItem>();
}
public Group(int number)
{
Number = number;
Items = new List<IItem>();
}
[GBaseColumn]
public int Number { get; private set; }
public List<IItem> Items { get; }
public GBaseKey Key { get; set; }
public string FileName => $"Group{Number}";
public override string ToString() => $"{Number}";
public void InitializeFromString(string @string) => Number = int.Parse(@string);
public void Initialize(GBaseKey key, List<object> parameters)
{
Key = key;
Number = (int) parameters[0];
}
}
}