示例#1
0
 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);
     }
 }
示例#2
0
 public GenericRepository(MadMenContext context)
 {
     _context = context;
 }