public void UpdateProfile(Profile profile) { var oldProfile = GetProfile(profile.Id); oldProfile.ContactNumber = profile.ContactNumber; oldProfile.Address = profile.Address; oldProfile.Description = profile.Description; oldProfile.Email = profile.Email; oldProfile.Designation = profile.Designation; oldProfile.PANNumber = profile.PANNumber; oldProfile.DateOfJoining = profile.DateOfJoining; oldProfile.DateOfLeaving = profile.DateOfLeaving; oldProfile.PreviousCompany = profile.PreviousCompany; oldProfile.PreviousJobProfile = profile.PreviousJobProfile; oldProfile.TotalWorkExperience = profile.TotalWorkExperience; oldProfile.ExperienceWithVE = profile.ExperienceWithVE; oldProfile.TIVRepresenting = profile.TIVRepresenting; oldProfile.AreaRepresenting = profile.AreaRepresenting; oldProfile.SAPCode = profile.SAPCode; oldProfile.TrainingLevel = profile.TrainingLevel; oldProfile.DateOfBirth = profile.DateOfBirth; profileRepo.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Profiles EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToProfiles(Profile profile) { base.AddObject("Profiles", profile); }
/// <summary> /// Create a new Profile object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="contactNumber">Initial value of the ContactNumber property.</param> /// <param name="objectInfo">Initial value of the ObjectInfo property.</param> public static Profile CreateProfile(global::System.Int32 id, global::System.String contactNumber, ObjectInfo objectInfo) { Profile profile = new Profile(); profile.Id = id; profile.ContactNumber = contactNumber; profile.ObjectInfo = StructuralObject.VerifyComplexObjectIsNotNull(objectInfo, "ObjectInfo"); return profile; }