Ejemplo n.º 1
0
        /// <summary>
        /// Récupére l'entité désignée par l'id en paramétre.
        /// </summary>
        /// <param name="id">Id de l'entité</param>
        /// <returns>Message de retour avec l'entité</returns>
        public async Task <DTO.ConstraintParameter> GetById(long id)
        {
            ENT.ConstraintParameter constraintParameter = await ConstraintSequenceDomain.GetConstraintParameter(id);

            DTO.ConstraintParameter dtoConstraintParameter = null;
            if (constraintParameter != null)
            {
                dtoConstraintParameter = Mapper.Map <ENT.ConstraintParameter, DTO.ConstraintParameter>(constraintParameter);
            }

            return(dtoConstraintParameter);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Ajoute un nouveau ConstraintParameter
        /// </summary>
        /// <param name="constraintParameter">Nouveau ConstraintParameter</param>
        /// <param name="constraintSequenceId">Id de la ConstraintSequence</param>
        /// <returns>Message de retour</returns>
        public async Task <DTO.ConstraintParameter> AddConstraintParameter(DTO.ConstraintParameter constraintParameter, long constraintSequenceId)
        {
            ENT.ConstraintParameter entConstraintParameter = Mapper.Map <DTO.ConstraintParameter, ENT.ConstraintParameter>(constraintParameter);

            return(Mapper.Map <ENT.ConstraintParameter, DTO.ConstraintParameter>(await ConstraintSequenceDomain.AddConstraintParameter(entConstraintParameter, constraintSequenceId)));
        }