Added seed from config instead of code

This commit is contained in:
Richárd Kunkli
2020-10-31 15:57:19 +01:00
parent 853f05d63c
commit 1172d89484
14 changed files with 443 additions and 68 deletions

View File

@ -15,19 +15,9 @@ namespace Birdmap.DAL.Entities.Configurations
.HasConversion(u => u.ToString(), u => new Uri(u))
.IsRequired();
builder.HasData(
new Service
{
Id = 1,
Name = "KMLabz services",
Uri = new Uri("https://birb.k8s.kmlabz.com/devices")
},
new Service
{
Id = 2,
Name = "Local Database",
Uri = new Uri("/health", UriKind.Relative)
});
builder.Property(s => s.IsFromConfig)
.HasDefaultValue(false)
.IsRequired();
}
}
}