Exemple #1
0
        private static void ReportJsonResults(IEnumerable <MigrationInfo> migrations)
        {
            var nameGroups = migrations.GroupBy(m => m.Name).ToList();
            var output     = migrations.Select(
                m => new
            {
                id       = m.Id,
                name     = m.Name,
                safeName = nameGroups.Count(g => g.Key == m.Name) == 1
                        ? m.Name
                        : m.Id
            }).ToArray();

            ConsoleCommandLogger.Json(output);
        }
 private static void ReportJson(MigrationFiles files)
 => ConsoleCommandLogger.Json(files);
        private static void ReportJsonResults(IEnumerable <Type> contextTypes)
        {
            var typeNames = contextTypes.Select(t => new { fullName = t.FullName }).ToArray();

            ConsoleCommandLogger.Json(typeNames);
        }