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