Moved export code into region
This commit is contained in:
parent
cdffce9bbd
commit
7676bea101
@ -66,7 +66,7 @@ public sealed class DataContext : DbContext, IDataContext
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Export and import data structures
|
#region Export and import
|
||||||
|
|
||||||
private readonly record struct JsonData(
|
private readonly record struct JsonData(
|
||||||
IEnumerable<JsonSetting> Settings,
|
IEnumerable<JsonSetting> Settings,
|
||||||
@ -138,8 +138,6 @@ public sealed class DataContext : DbContext, IDataContext
|
|||||||
JsonUniqueId TextElementUniqueId
|
JsonUniqueId TextElementUniqueId
|
||||||
);
|
);
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
public async Task ExportAsync(string path)
|
public async Task ExportAsync(string path)
|
||||||
{
|
{
|
||||||
var jsonSettings = new JsonSerializerOptions
|
var jsonSettings = new JsonSerializerOptions
|
||||||
@ -158,4 +156,6 @@ public sealed class DataContext : DbContext, IDataContext
|
|||||||
Translations = this.Translations.Select(n => n.ToJsonTranslation()),
|
Translations = this.Translations.Select(n => n.ToJsonTranslation()),
|
||||||
}, jsonSettings);
|
}, jsonSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user