public async Task AddProfessionalHistoryToResume(string personEmail, ExperienceHistory experienceHistory) { Resume toUpdate = await this.GetCompleteResumeByPersonEmail(personEmail, false); experienceHistory.Employer = await this.AddGetEmployer(experienceHistory.Employer); this.Employers.Attach(experienceHistory.Employer); toUpdate.ProfessionalExperienceHistories.Add(experienceHistory); await this.SaveChangesAsync(); }
private static ExperienceHistory GetGoDaddyHistory() { Employer godaddyEmployer = new Employer() { Name = "Go Daddy" }; List <ContentSubItem> contentSubItems = new List <ContentSubItem>(); ContentSubItem gd1 = new ContentSubItem() { SubItemContent = @"Contributed substantially to the Office 365 team’s code base by fixing bugs and enhancing many software features." }; ContentSubItem gd2 = new ContentSubItem() { SubItemContent = @"Programmed a full stack website from scratch, which required high performance sorting and searching for 100,000 entries. It used Node JS, Ember JS, and Mongo DB to load data from a slow external web API into a faster local database." }; ContentSubItem gd3 = new ContentSubItem() { SubItemContent = @"Won first place in a GoDaddy sponsored hackathon and received a patent for our idea and implementation." }; contentSubItems.Add(gd1); contentSubItems.Add(gd2); contentSubItems.Add(gd3); ContentItem overview = new ContentItem() { ExperienceItemContent = "Overview", ExperienceSubItems = contentSubItems }; List <ContentItem> contentItems = new List <ContentItem>(); contentItems.Add(overview); ExperienceHistory godaddyHistory = new ExperienceHistory() { Current = true, StartDate = new DateTime(2014, 1, 1, 0, 0, 0), EndDate = new DateTime(2015, 1, 1, 0, 0, 0), Employer = godaddyEmployer, ExperienceItems = contentItems }; return(godaddyHistory); }