public int Add(ref Mugurtham.Core.User.UserCoreEntity objUserCoreEntity, out string strUserID) { strUserID = Helpers.primaryKey; try { IUnitOfWork objIUnitOfWork = new UnitOfWork(); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.User.User objDTOUser = new DTO.User.User(); using (objDTOUser as IDisposable) { objUserCoreEntity.ID = strUserID; assignHomePagePath(ref objUserCoreEntity); AssignDTOFromEntity(ref objDTOUser, ref objUserCoreEntity); } objIUnitOfWork.RepositoryUser.Add(objDTOUser); objDTOUser = null; } objIUnitOfWork.commit(); objIUnitOfWork = null; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return 0; }
public int Edit(ref Mugurtham.Core.User.UserCoreEntity objUserCoreEntity) { try { IUnitOfWork objIUnitOfWork = new UnitOfWork(_ConnectionStringAppKey); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.User.User objDTOUser = new DTO.User.User(); using (objDTOUser as IDisposable) { assignHomePagePath(ref objUserCoreEntity); AssignDTOFromEntity(ref objDTOUser, ref objUserCoreEntity); } objIUnitOfWork.RepositoryUser.Edit(objDTOUser); objDTOUser = null; } objIUnitOfWork.commit(); objIUnitOfWork = null; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return(0); }
public int Edit(ref Mugurtham.Core.User.UserCoreEntity objUserCoreEntity) { try { IUnitOfWork objIUnitOfWork = new UnitOfWork(); using (objIUnitOfWork as IDisposable) { Mugurtham.DTO.User.User objDTOUser = new DTO.User.User(); using (objDTOUser as IDisposable) { assignHomePagePath(ref objUserCoreEntity); AssignDTOFromEntity(ref objDTOUser, ref objUserCoreEntity); } objIUnitOfWork.RepositoryUser.Edit(objDTOUser); objDTOUser = null; } objIUnitOfWork.commit(); objIUnitOfWork = null; } catch (Exception objEx) { Helpers.LogExceptionInFlatFile(objEx); } return 0; }