public void Update(ArticleViewModel model) { var entity = new Articles(); entity.ArticleId = model.ArticleId; entity.ArticleDate = model.ArticleDate; entity.AuthorName = model.AuthorName; entity.Name = model.Name; entity.Title = model.Title; entity.Description = model.Description; entity.Country = model.Country; entity.ArticleMemberID = model.ArticleMemberId; entities.Articles.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(TeachersViewModel model) { var entity = new Teachers(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.FullName = model.FullName; entity.Country = model.Country; entity.School = model.School; entity.SchoolAddress = model.SchoolAddress; entity.Phone = model.Phone; entity.Email = model.Email; entity.SocialMedia = model.SocialMedia; entity.LoginName = model.LoginName; entities.Teachers.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(LiaisonOfficersViewModel model) { var entity = new LiaisonOfficers(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.FullName = model.FullName; entity.Country = model.Country; entity.Phone = model.Phone; entity.Email = model.Email; entity.OfficeAddress = model.OfficeAddress; entity.Occupation = model.Occupation; entity.Employer = model.Employer; entity.LoginName = model.LoginName; entities.LiaisonOfficers.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(StudentsViewModel model) { var entity = new Students(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.FullName = model.FullName; entity.Birthdate = model.Birthdate; entity.Gender = model.Gender; entity.Phone = model.Phone; entity.Email = model.Email; entity.Country = model.Country; entity.Specialization = model.Specialization; entity.School = model.School; entity.LoginName = model.LoginName; entities.Students.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(SchoolsViewModel model) { var entity = new Schools(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.SchoolName = model.SchoolName; entity.ContactPerson = model.ContactPerson; entity.Country = model.Country; entity.Address = model.Address; entity.Phone = model.Phone; entity.Email = model.Email; entity.Website = model.Website; entity.SocialMedia = model.SocialMedia; entity.LoginName = model.LoginName; entities.Schools.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(OrganizationsViewModel model) { var entity = new Organizations(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.OrganizationName = model.OrganizationName; entity.ContactPerson = model.ContactPerson; entity.Country = model.Country; entity.Headquarters = model.Headquarters; entity.JobSector = model.JobSector; entity.Phone = model.Phone; entity.Email = model.Email; entity.Website = model.Website; entity.SocialMedia = model.SocialMedia; entity.LoginName = model.LoginName; entities.Organizations.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(AmbassadorsViewModel model) { var entity = new Ambassadors(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.LoginName = model.LoginName; entity.FullName = model.FullName; entity.Address = model.Address; entity.Country = model.Country; entity.Phone = model.Phone; entity.Email = model.Email; entity.Website = model.Website; entity.SocialMedia = model.SocialMedia; entity.Occupation = model.Occupation; entity.JobSector = model.JobSector; entity.Employer = model.Employer; entities.Ambassadors.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(ApprenticeshipViewModel model) { var entity = new Apprenticeships(); entity.ApprenticeshipID = model.ApprenticeshipID; entity.PostDate = model.PostDate; entity.DurationMonths = model.DurationMonths; entity.Name = model.Name; entity.Title = model.Title; entity.Description = model.Description; entity.Country = model.Country; entity.Commitment = model.Commitment; entity.Compensation = model.Compensation; entity.JobSector = model.JobSector; entity.Status = model.Status; entity.StartDate = model.StartDate; entity.EndDate = model.EndDate; entity.EmployerID = model.EmployerID; entities.Apprenticeships.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }
public void Update(EmployersViewModel model) { var entity = new Employers(); entity.MemberID = model.MemberID; entity.TaxNumber = model.TaxNumber; entity.CompanyName = model.CompanyName; entity.ContactPerson = model.ContactPerson; entity.Headquarters = model.Headquarters; entity.Country = model.Country; entity.JobSector1 = model.JobSector1; entity.JobSector2 = model.JobSector2; entity.JobSector3 = model.JobSector3; entity.Phone = model.Phone; entity.Email = model.Email; entity.Website = model.Website; entity.SocialMedia = model.SocialMedia; entity.LoginName = model.LoginName; entities.Employers.Attach(entity); entities.Entry(entity).State = EntityState.Modified; entities.SaveChanges(); }