public async Task <List <VideoCategory> > GenerateVideoCategories(int range) { var videoCategories = new List <VideoCategory>(); for (var videoCategoryNumber = 1; videoCategoryNumber < range; videoCategoryNumber++) { var videoCategory = new VideoCategory() { Id = Guid.NewGuid().ToString(), Name = _helper.GetProductCategoryName(videoCategoryNumber) }; videoCategories.Add(videoCategory); Context.Add(videoCategory); } await Context.SaveChangesAsync(); return(videoCategories); }