Closed SandraJones closed 7 years ago
Here is the file code where the error occurs:
protected override void Seed(VolunteerTrack.Models.ApplicationDbContext context)
{
Assembly assembly = Assembly.GetExecutingAssembly();
string resourceName = "SeedingDataFromCSV.Domain.SeedData.CharitableOrganizations.csv";
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
{
using (StreamReader reader = new StreamReader(stream, Encoding.UTF8))
{
CsvReader csvReader = new CsvReader(reader);
csvReader.Configuration.WillThrowOnMissingField = false;
var orgs = csvReader.GetRecords
@SandraJones Let's talk more about this today during class. Going forward, the issues here are only for Capstone pitches, not general help.
I have one problem, though. I changed my VolunteerContext file to show
public class VolunteerContext : ApplicationDbContext ( instead of just DbContext)
I did this because in my seed file I am getting an error saying
ApplicationDbContext does not contain a definition for 'CharitableOrganizations' and no extension method of 'CharitableOrganizations' accepting a first argument of type ApplicationDbContext could be found are you missing a using directive or assembly reference?
I am pushing it up even though it is not complete just in case you get a moment to take a look. I did it on the repo branch.