Arrays DBContext.ChangeTracker未检测到对数组的更改

Arrays DBContext.ChangeTracker未检测到对数组的更改,arrays,vb.net,entity-framework,data-binding,Arrays,Vb.net,Entity Framework,Data Binding,VB.NET中的我的EF6项目使用以下映射映射到MySQL数据库: Partial Public Class WorkRule Public Property WorkRuleID As Integer 'Maps to int Public Property Description As String 'Maps to tinytext Public Property RegularTime As Byte() 'Maps to tinyblob End Class

VB.NET中的我的EF6项目使用以下映射映射到MySQL数据库:

Partial Public Class WorkRule 
    Public Property WorkRuleID As Integer 'Maps to int
    Public Property Description As String 'Maps to tinytext
    Public Property RegularTime As Byte() 'Maps to tinyblob
End Class
如果编辑“说明”文本框,则在调用.SaveChanges时会检测到更改并按预期保存。但是,如果编辑绑定到数组元素的其中一个文本框的内容,则绑定的元素会更改,但DBContext.ChangeTracker不会检测到更改,并且在调用.SaveChanges时不会将更改保存到数据库中

我可以通过手动设置DBContext.Entry().State=EntityState.Modified来强制保存,但是有更好的方法可以自动检测对数组元素的更改吗?我应该使用数组以外的东西吗

代码如下:

XAML:

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <ListBox x:Name="lstWorkRules"/>
        <StackPanel Grid.Column="1" DataContext="{Binding ElementName=lstWorkRules, Path=SelectedItem}">
            <Label>Description:</Label>
            <TextBox Text="{Binding Path=Description}"/>
            <Label>Day 1:</Label>
            <TextBox Text="{Binding Path=RegularTime[0]}"/>
            <Label>Day 2:</Label>
            <TextBox Text="{Binding Path=RegularTime[1]}"/>
            <Label>Etc.</Label>
            <Button Click="Button_Click">Save</Button>
        </StackPanel>

    </Grid>
Imports System.Data.Entity

Class MainWindow
    Dim wrContext As WorkRuleEntities

    Private Sub Window_Loaded(sender As Object, e As RoutedEventArgs)
        wrContext = New WorkRuleEntities
        wrContext.WorkRules.Load

        lstWorkRules.ItemsSource = wrContext.WorkRules.Local
        lstWorkRules.DisplayMemberPath = "Description"
    End Sub

    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
        wrContext.SaveChanges()
    End Sub
End Class