public static void EnsureSeeded(this IdeContext context, IFileStorageNoSqlDbSettings settings)
 {
     if (context.Users.Count() == 0)
     {
         context.SeedWithCorrectData(settings);
     }
 }
        public static void SeedWithCorrectData(this IdeContext context, IFileStorageNoSqlDbSettings settings)
        {
            var avatars = GenerateCorrectImages();

            context.Images.AddRange(avatars);
            var editorSettings = GenerateCorrectEditorSettings();

            context.EditorSettings.AddRange(editorSettings);
            context.SaveChanges();

            var users = GenerateCorrectUsers(context.Images.ToArray(), context.EditorSettings.ToArray());

            context.Users.AddRange(users);
            context.SaveChanges();

            var dBUsers = context.Users.ToArray();

            var projects = GenerateCorrectProjects(dBUsers, context.EditorSettings.ToArray());

            context.Projects.AddRange(projects);
            context.SaveChanges();

            var dBProjects = context.Projects.ToArray();

            var projectMembers = GenerateCorrectProjectMembers(dBProjects, dBUsers);

            context.ProjectMembers.AddRange(projectMembers);

            var favouriteProjects = GenerateCorrectFavouriteProjects(dBProjects, dBUsers);

            context.FavouriteProjects.AddRange(favouriteProjects);

            context.SaveChanges();

            EnsureNoSqlDbSeeded(settings, dBProjects);

            var builds = GenerateRandomBuilds(context.Users.ToList(), context.Projects.ToList());

            context.Builds.AddRange(builds);
            context.SaveChanges();
        }