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.

34 lines
776 B

// Author: Gockner, Simon
// Created: 2020-09-18
// Copyright(c) 2020 SimonG. All Rights Reserved.
using GBase.Attributes;
namespace Test.GBase.GBaseIntegrationTest
{
[GBaseTable("Items")]
public class Item : IItem
{
public Item(string name, int key)
{
Name = name;
Key = key;
}
[GBaseColumn]
public string Name { get; private set; }
[GBaseColumn]
public int Key { get; private set; }
public override string ToString() => $"{Name}";
public void InitializeFromString(string @string)
{
string[] properties = @string.Split('/');
Key = int.Parse(properties[0]);
Name = properties[1];
}
}
}