@typeparam TTaxonomy where TTaxonomy : BaseTaxonomyModel
@code {
[Parameter] public BaseDatabaseService DataService { get; set; }
[Parameter] public ICollection Values { get; set; }
[Parameter] public EventCallback> ValuesChanged { get; set; }
ICollection _entities = new List();
protected override async Task OnInitializedAsync()
{
_entities = await DataService.AsNoTracking().GetAsync();
}
async Task Add(string name)
{
var taxonomy = Activator.CreateInstance(typeof(TTaxonomy)) as TTaxonomy;
taxonomy.Name = name;
taxonomy = await DataService.AddAsync(taxonomy);
return taxonomy;
}
}