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);
            }
        }
Example #2
0
 public async Task <int> Complete()
 {
     return(await _context.SaveChangesAsync());
 }