mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
tidy 11fba23
This commit is contained in:
parent
5bfe4ed976
commit
c03ec0f8b7
1 changed files with 9 additions and 9 deletions
|
|
@ -151,15 +151,15 @@ private static string GetUpdateUnchangedColumnHack(IEnumerable<IProperty> proper
|
|||
|
||||
private static void SetDefaultLicenseId(this DbContext dbContext)
|
||||
{
|
||||
var lists = dbContext.Set<FilterList>()
|
||||
.Where(l => l.LicenseId == null)
|
||||
.ToList()
|
||||
.Select(c =>
|
||||
{
|
||||
c.LicenseId = 5;
|
||||
return c;
|
||||
});
|
||||
dbContext.UpdateRange(lists);
|
||||
var listsWithoutLicense = dbContext.Set<FilterList>()
|
||||
.Where(l => l.LicenseId == null)
|
||||
.ToList()
|
||||
.Select(l =>
|
||||
{
|
||||
l.LicenseId = 5;
|
||||
return l;
|
||||
});
|
||||
dbContext.UpdateRange(listsWithoutLicense);
|
||||
dbContext.SaveChanges();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue