seed tidies

This commit is contained in:
Collin M. Barrett 2018-09-26 10:30:31 -05:00
parent 8be5df79ab
commit d8d66dc5cc
6 changed files with 529 additions and 536 deletions

File diff suppressed because it is too large Load diff

View file

@ -903,4 +903,4 @@
"filterListId": 771,
"languageId": 99
}
]
]

View file

@ -2595,4 +2595,4 @@
"filterListId": 750,
"tagId": 10
}
]
]

View file

@ -145,4 +145,4 @@
"isAbpSubscribable": false,
"name": "Diversion"
}
]
]

View file

@ -199,4 +199,4 @@
"softwareId": 21,
"syntaxId": 19
}
]
]

View file

@ -21,13 +21,6 @@ public SeedService(FilterListsDbContext dbContext, IConfigurationProvider mapCon
public async Task<IEnumerable<TSeedDto>> GetAllAsync<TEntity, TSeedDto>() where TEntity : class =>
await DbContext.Set<TEntity>().ProjectTo<TSeedDto>(MapConfig).ToArrayAsync();
public async Task<IEnumerable<TSeedDto>> GetAllAsync<TEntity, TSeedDto>(PropertyInfo primarySort)
where TEntity : class =>
await DbContext.Set<TEntity>()
.OrderBy(x => primarySort.GetValue(x, null))
.ProjectTo<TSeedDto>(MapConfig)
.ToArrayAsync();
public async Task<IEnumerable<TSeedDto>> GetAllAsync<TEntity, TSeedDto>(PropertyInfo primarySort,
PropertyInfo secondarySort)
where TEntity : class =>