Example #1
0
        public ReferenceCoreEntity GetByProfileID(string strProfileID)
        {
            ReferenceCoreEntity objReferenceCoreEntity = new ReferenceCoreEntity();

            try
            {
                Mugurtham.DTO.Profile.Reference objReference = new Mugurtham.DTO.Profile.Reference();
                IUnitOfWork objUOW = new UnitOfWork(_objLoggedInUser.ConnectionStringAppKey);
                using (objUOW as IDisposable)
                    objReference = objUOW.RepositoryReference.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
                objUOW = null;
                if (objReference != null)
                {
                    using (objReference as IDisposable)
                    {
                        AssignEntityFromDTO(ref objReference, ref objReferenceCoreEntity);
                    }
                }
                objReference = null;
            }
            catch (Exception objEx)
            {
                Helpers.LogExceptionInFlatFile(objEx);
            }
            return(objReferenceCoreEntity);
        }
Example #2
0
 public ReferenceCoreEntity GetByProfileID(string strProfileID)
 {
     ReferenceCoreEntity objReferenceCoreEntity = new ReferenceCoreEntity();
     try
     {
         Mugurtham.DTO.Profile.Reference objReference = new Mugurtham.DTO.Profile.Reference();
         IUnitOfWork objUOW = new UnitOfWork();
         using (objUOW as IDisposable)
             objReference = objUOW.RepositoryReference.GetAll().ToList().Where(p => p.ProfileID.Trim().ToLower() == strProfileID.Trim().ToLower()).FirstOrDefault();
         objUOW = null;
         if (objReference != null)
         {
             using (objReference as IDisposable)
             {
                 AssignEntityFromDTO(ref objReference, ref objReferenceCoreEntity);
             }
         }
         objReference = null;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return objReferenceCoreEntity;
 }
Example #3
0
 private int AssignEntityFromDTO(ref Mugurtham.DTO.Profile.Reference objDTOReference, ref Mugurtham.Core.Reference.ReferenceCoreEntity objReferenceCoreEntity)
 {
     try
     {
         objReferenceCoreEntity.ContactNo   = objDTOReference.ContactNo;
         objReferenceCoreEntity.NomineeName = objDTOReference.NomineeName;
         objReferenceCoreEntity.ProfileID   = objDTOReference.ProfileID;
     }
     catch (Exception objEx)
     {
         Helpers.LogExceptionInFlatFile(objEx);
     }
     return(0);
 }