问题描述
我正在实现一个包含许多拥有类型的模型,并且需要在拥有类型的属性上创建索引。据我了解,我无法使用 <table class="table">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">edit</th>
</tr>
</thead>
<tbody>
<tr *ngFor='let oject of yourObjectList; let i=index'>
<th scope="row">{{ i+1 }}</th>
<td>{{ oject.firstName }}</td>
<td>{{ oject.lastName }}</td>
<td (click)='edit(i or object)'></td>
</tr>
</ tbody >
</table>
直接在 Fluent API 中创建索引,而是我应该使用 Shadow 属性并在其上创建索引。我想我已经正确实现了阴影属性 (Geo),但是索引器不起作用。请帮忙。
我使用的是 .NET5
这是我的模型(为了便于阅读而进行了简化)
builder.HasIndex(entity => entity.location.geo);
和配置类:
public class Meeting
{
public long Id { get; set; }
public string Name { get; set; }
public DateTime StartDate { get; set; }
public Location Location { get; set; }
}
public class Location
{
public Point Geo { get; set; }
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)