Closed
Description
Hi,
I have this table -
[Table("Settings")]
public class SettingsTbl
{
[Key]
public SettingsEnum Setting { get; set; }
[Required]
[MaxLength(20)]
public string Value { get; set; }
}
and this in the database context -
modelBuilder
.Entity<SettingsTbl>()
.Property(e => e.Setting)
.HasConversion<string>();
Calling this method -
public async Task UpdateSetting(SettingsEnum setting, object value)
{
await dbSet
.Where(x => x.Setting == setting)
.BatchUpdateAsync(x => new SettingsTbl
{
Value = value.ToString()
})
.ConfigureAwait(false);
}
Using NuGet version - 3.2.3