/// <summary> /// This Function Will Update Joint Account Contact Information Of Introducing Broker /// </summary> /// <param name="userID">userID</param> /// <param name="jointAccountInformation">jointAccountInformation</param> /// <returns>result</returns> public bool UpdateJointContactInforamation(int userID, JointAccountInformation jointAccountInformation) { try { using (var unitOfWork = new EFUnitOfWork()) { var introducingBrokerRepo = new IntroducingBrokerRepository(new EFRepository <IntroducingBroker>(), unitOfWork); ObjectSet <IntroducingBroker> introducingBrokerObjSet = ((CurrentDeskClientsEntities)introducingBrokerRepo.Repository.UnitOfWork.Context).IntroducingBrokers; var updateRow = introducingBrokerObjSet.Where(x => x.FK_UserID == userID). Include("JointAccountInformations").Include("User").FirstOrDefault(); //Update particular column values updateRow.JointAccountInformations.FirstOrDefault().TelephoneNumber = jointAccountInformation.TelephoneNumber; updateRow.JointAccountInformations.FirstOrDefault().MobileNumber = jointAccountInformation.MobileNumber; updateRow.User.UserEmailID = jointAccountInformation.EmailAddress; //if (updateRow.AssetManagers.FirstOrDefault() != null) //{ // updateRow.AssetManagers.FirstOrDefault().UserEmail = jointAccountInformation.EmailAddress; //} //Save changes introducingBrokerRepo.Save(); } return(true); } catch (Exception ex) { CommonErrorLogger.CommonErrorLog(ex, System.Reflection.MethodBase.GetCurrentMethod().Name); return(true); } }
public void Delete(JointAccountInformation entity) { Repository.Delete(entity); }
public void Add(JointAccountInformation entity) { Repository.Add(entity); }