40 lines
561 B
Plaintext
40 lines
561 B
Plaintext
@* @using System.Reflection
|
|
@typeparam TModel
|
|
|
|
|
|
|
|
|
|
@foreach (var model in models)
|
|
{
|
|
@foreach (var property in Properties.Where(x => ))
|
|
{
|
|
property.GetValue(model);
|
|
}
|
|
|
|
|
|
@foreach (var member in model.GetProperties())
|
|
{
|
|
member.GetValue(memb);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
@code {
|
|
|
|
|
|
[Parameter]
|
|
public List<string> Exclude { get; set; }
|
|
|
|
[Parameter] public Func<Task<List<TModel>>> GetDataFunc { get; set; }
|
|
|
|
IEnumerable<TModel> models;
|
|
|
|
PropertyInfo[] Properties = typeof(TModel).GetProperties();
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
models = await GetDataFunc();
|
|
}
|
|
|
|
} *@ |