private int AssignDTOFromEntity(ref Mugurtham.DTO.Profile.Career objCareer, ref Mugurtham.Core.Career.CareerCoreEntity objCareerCoreEntity) { try { objCareer.Education = objCareerCoreEntity.Education; objCareer.EducationInDetail = objCareerCoreEntity.EducationInDetail; objCareer.EmployedIn = objCareerCoreEntity.EmployedIn; objCareer.Income = objCareerCoreEntity.AnnualIncome; objCareer.Occupation = objCareerCoreEntity.Occupation; objCareer.OccupationInDetail = objCareerCoreEntity.OccupationInDetail; objCareer.CreatedDate = DateTime.Now; objCareer.ModifiedDate = DateTime.Now; objCareer.ProfileID = objCareerCoreEntity.ProfileID; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return(0); }
public int Edit(ref Mugurtham.Core.Career.CareerCoreEntity objCareerCoreEntity) { try { IUnitOfWork objIUnitOfWork = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.Profile.Career objDTOCareer = new DTO.Profile.Career(); using (objDTOCareer as IDisposable) { AssignDTOFromEntity(ref objDTOCareer, ref objCareerCoreEntity); } objIUnitOfWork.RepositoryCareer.Edit(objDTOCareer); objDTOCareer = null; } objIUnitOfWork.commit(); objIUnitOfWork = null; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return(0); }