static void ExportEntity <T>(MemDB mem, DemoDbContext dbContext) where T : EntityBase, new() { List <T> entityList = dbContext.QueryAllList <T>(); SaveEntity <T>(mem, entityList.ToArray()); }