mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(directory): ✨ explicitly pluralize table names that aren't mapped to DbContext
This commit is contained in:
parent
17a1ade6b7
commit
56e88990b6
10 changed files with 20 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<Dependent> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(Dependent) + "s");
|
||||
|
||||
const string dependencyFilterListId = nameof(Dependent.DependencyFilterList) + "Id";
|
||||
const string dependentFilterListId = nameof(Dependent.DependentFilterList) + "Id";
|
||||
builder.Property<int>(dependencyFilterListId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<FilterListLanguage> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(FilterListLanguage) + "s");
|
||||
|
||||
const string filterListId = nameof(FilterListLanguage.FilterList) + "Id";
|
||||
const string languageId = nameof(Language) + nameof(Language.Iso6391);
|
||||
builder.Property<int>(filterListId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<FilterListMaintainer> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(FilterListMaintainer) + "s");
|
||||
|
||||
const string filterListId = nameof(FilterListMaintainer.FilterList) + "Id";
|
||||
const string maintainerId = nameof(FilterListMaintainer.Maintainer) + "Id";
|
||||
builder.Property<int>(filterListId);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ internal class FilterListSyntaxTypeConfiguration : IEntityTypeConfiguration<Filt
|
|||
public virtual void Configure(EntityTypeBuilder<FilterListSyntax> builder)
|
||||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(FilterListSyntax) + "es");
|
||||
|
||||
const string filterListId = nameof(FilterListSyntax.FilterList) + "Id";
|
||||
const string syntaxId = nameof(FilterListSyntax.Syntax) + "Id";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<FilterListTag> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(FilterListTag) + "s");
|
||||
|
||||
const string filterListId = nameof(FilterListTag.FilterList) + "Id";
|
||||
const string tagId = nameof(FilterListTag.Tag) + "Id";
|
||||
builder.Property<int>(filterListId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<Fork> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(Fork) + "s");
|
||||
|
||||
const string upstreamFilterListId = nameof(Fork.UpstreamFilterList) + "Id";
|
||||
const string forkFilterListId = nameof(Fork.ForkFilterList) + "Id";
|
||||
builder.Property<int>(upstreamFilterListId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<Merge> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(Merge) + "s");
|
||||
|
||||
const string includedInFilterListId = nameof(Merge.IncludedInFilterList) + "Id";
|
||||
const string includesFilterListId = nameof(Merge.IncludesFilterList) + "Id";
|
||||
builder.Property<int>(includedInFilterListId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<SoftwareSyntax> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(SoftwareSyntax) + "es");
|
||||
|
||||
const string softwareId = nameof(SoftwareSyntax.Software) + "Id";
|
||||
const string syntaxId = nameof(SoftwareSyntax.Syntax) + "Id";
|
||||
builder.Property<int>(softwareId);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public virtual void Configure(EntityTypeBuilder<ViewUrlMirror> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(ViewUrlMirror) + "s");
|
||||
|
||||
const string viewUrlMirrorId = "Id";
|
||||
builder.Property<int>(viewUrlMirrorId);
|
||||
builder.HasKey(viewUrlMirrorId);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ public virtual void Configure(EntityTypeBuilder<ViewUrlPartial> builder)
|
|||
{
|
||||
_ = builder ?? throw new ArgumentNullException(nameof(builder));
|
||||
|
||||
builder.ToTable(nameof(ViewUrlPartial) + "s");
|
||||
|
||||
const string filterListId = nameof(ViewUrlPartial.FilterList) + "Id";
|
||||
builder.Property<int>(filterListId);
|
||||
builder.HasKey(filterListId, nameof(ViewUrlPartial.Position));
|
||||
|
|
|
|||
Loading…
Reference in a new issue