public static async Task Seed(MadMenContext context, ILoggerFactory loggerFactory) { try { await context.SaveChangesAsync(); } catch (Exception ex) { var logger = loggerFactory.CreateLogger <MadMenContext>(); logger.LogError(ex.Message); } }
public GenericRepository(MadMenContext context) { _context = context; }