public void InsertProfessionalEvent(int applicantId) { var context = new SidejobEntities(); var professionalEvent = new ProfessionalEvent { ProID = applicantId, EventID = GetNextEventID(), NumberofEvents = 1, Type = 1 }; context.AddToProfessionalEvents(professionalEvent); }