public static async Task SeedAsync(ExampleContext context, ILoggerFactory loggerFactory) { try { var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); await context.SaveChangesAsync(); } catch (Exception ex) { var logger = loggerFactory.CreateLogger <ExampleContext>(); logger.LogError(ex.Message); } }
public async Task <int> Complete() { return(await _context.SaveChangesAsync()); }