I have the following class derived from entity framework class as follows.
internal class MyInitializer : CreateDatabaseIfNotExists<ConfigurationDbContext>
{
protected override async void Seed(ConfigurationDbContext context)
{
await DbHelper.AddSampleDataAsync(context);
base.Seed(context);
}
}
I get the following compiler error when I change "void" to "async Task".
return type must be 'void' to match overridden member
async/await best practices tell you to almost always return async Task instead of void. Just wanted to make sure my usage of void here is one of those acceptable scenarios for using void. What other options do I have anyways?