/// <summary> /// Obtiene una colección de storeEntity /// </summary> /// <param name="loadRelation">true si desea guardar las relaciones</param> /// <param name="session">Identificador de sesion.</param> /// <returns>Collection de StoreEntity</returns> /// <exception cref="UtnEmallBusinessLogicException"> /// Si una excepción UtnEmallDataAccessException ocurre en el data model. /// </exception> public Collection <StoreEntity> GetAllStore(bool loadRelation) { try { return(storeDataAccess.LoadAll(loadRelation)); } catch (UtnEmallDataAccessException utnEmallDataAccessException) { throw new UtnEmallBusinessLogicException(utnEmallDataAccessException.Message, utnEmallDataAccessException); } }
/// <summary> /// Get collection of all storeEntity /// </summary> /// <param name="loadRelation">true to load the relations</param> /// <param name="session">User's session identifier.</param> /// <returns>Collection of all StoreEntity</returns> /// <exception cref="UtnEmallBusinessLogicException"> /// If an UtnEmallDataAccessException occurs in DataModel. /// </exception> public Collection <StoreEntity> GetAllStore(bool loadRelation, string session) { bool permited = ValidationService.Instance.ValidatePermission(session, "read", "Store"); if (!permited) { ExceptionDetail detail = new ExceptionDetail(new UtnEmall.Server.BusinessLogic.UtnEmallPermissionException("The user hasn't permissions to read an entity")); throw new FaultException <ExceptionDetail>(detail); } try { return(storeDataAccess.LoadAll(loadRelation)); } catch (UtnEmallDataAccessException utnEmallDataAccessException) { throw new UtnEmall.Server.BusinessLogic.UtnEmallBusinessLogicException(utnEmallDataAccessException.Message, utnEmallDataAccessException); } }