I'm hoping there will be a crazy linq answer to this, it feels like there should be
Current code:
MapHierarchy().Case<Folder>(f => new { FolderId = f.Id,
f.Name,
Type = 1 })
.Case<RootFolder>(f => new { f.RootName,
Type = 2 })
.ToTable("Folder");
Another method:
void AddAnotherFolder(something)
{
something.Case<RootFolder>(f => new { f.RootName, Type = 2 })
}
What I would like to be able to do is pass that method into the MapHierarchy string - is that possible?
Something like...
MapHierarchy().Case<Folder>(f => new { FolderId = f.Id,
f.Name,
Type = 1 })
.Case<RootFolder>(f => new { f.RootName,
Type = 2 })
.AddAnotherFolder(this)
.ToTable("Folder");
It feels like a linq question, would be VERY cool if it could