I have been playing around with this package. But I really miss the feature in the table extensions that is not referencing the database it self:
partial void OnAfterConstruct()
{
}
Yes you can make very handy table extensions here. But in my use case I really like to add extension method. For example. Person has items. Persons and items are a many to many relation.
By only referencing the database as well this make it possible:
public sealed partial class PersonRelationTable
{
private MemoryDatabase _database;
partial void OnAfterConstruct(MemoryDatabaseBase db)
{
_database = (MemoryDatabase)db;
}
public IEnumerable<RelationItem> GetItemsFromPerson(int personId)
{
foreach (var item in _database.PersonRelationItemTable.FindByPersonId(personId))
{
yield return _database.RelationItemTable.FindByItemId(item.ItemId);
}
}
}
Btw I already made the change. So if you are interested in my changes let me know. Also thank you for the amazing work!
I have been playing around with this package. But I really miss the feature in the table extensions that is not referencing the database it self:
partial void OnAfterConstruct()
{
}
Yes you can make very handy table extensions here. But in my use case I really like to add extension method. For example. Person has items. Persons and items are a many to many relation.
By only referencing the database as well this make it possible:
public sealed partial class PersonRelationTable
{
private MemoryDatabase _database;
Btw I already made the change. So if you are interested in my changes let me know. Also thank you for the amazing work!