private async Task AddToContextAsync <TEntity>(FootieDataManagerContext context) where TEntity : class
        {
            var dbSet = context.Set <TEntity>();

            if (!await dbSet.AnyAsync())
            {
                var propertyName = context.GetType().GetProperties().FirstOrDefault(p => p.PropertyType.IsGenericType && p.PropertyType.GetGenericArguments()[0] == typeof(TEntity))?.Name;
                var csv          = BuildFilePath(propertyName);

                var seedData = _csvDataRetriever.RetrieveData <TEntity>(csv);

                seedData?.ForEach(x =>
                {
                    context.Entry(x).State = EntityState.Added;
                    context.SaveChanges();
                });
            }
        }
        public async Task SeedAsync(FootieDataManagerContext context)
        {
            foreach (var entityType in context.Model.GetEntityTypes())
            {
                var type      = entityType.ClrType;
                var setMethod = context.GetType().GetMethod(nameof(context.Set)).MakeGenericMethod(type);

                IQueryable <dynamic> dbSet = setMethod?.Invoke(context, null) as IQueryable <dynamic>;

                if (!await dbSet?.AnyAsync())
                {
                    var propertyName = context.GetType().GetProperties().FirstOrDefault(p => p.PropertyType.IsGenericType && p.PropertyType.GetGenericArguments()[0] == type)?.Name;
                    var csv          = BuildFilePath(propertyName);

                    var seedData = File.Exists(csv)
                        ? _csvDataRetriever.RetrieveData(type, csv)
                        : GetPredefinedValues(dbSet);

                    seedData?.ForEach(x => context.Entry(x).State = EntityState.Added);
                }
            }

            await context.SaveChangesAsync();
        }