/// <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.WorkflowInstance> GetById(long id)
        {
            ENT.WorkflowInstance workflowInstance = await WorkflowInstanceDomain.Get(id);

            DTO.WorkflowInstance dtoWorkflowInstance = null;
            if (workflowInstance != null)
            {
                dtoWorkflowInstance = Mapper.Map <ENT.WorkflowInstance, DTO.WorkflowInstance>(workflowInstance);
            }

            return(dtoWorkflowInstance);
        }
 /// <summary>
 /// This function permits to update an instance
 /// </summary>
 /// <param name="workflowConfig"></param>
 /// <returns>WorkflowConfig</returns>
 public async Task <DTO.WorkflowInstance> Put(long id, DTO.WorkflowInstance dto)
 {
     DTO.WorkflowInstance element = Mapper.Map <ENT.WorkflowInstance, DTO.WorkflowInstance>(await WorkflowInstanceDomain.Get(id));
     if (element.Id != 0)
     {
         dto.Id = element.Id;
         return(Mapper.Map <ENT.WorkflowInstance, DTO.WorkflowInstance>(
                    await WorkflowInstanceDomain.Add(Mapper.Map <DTO.WorkflowInstance, ENT.WorkflowInstance>(dto))));
     }
     else
     {
         return(new DTO.WorkflowInstance());
     }
 }
        /// <summary>
        /// This function permits to put an instance
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        public async Task <DTO.WorkflowInstance> Post(DTO.WorkflowInstance dto)
        {
            ENT.WorkflowInstance element = Mapper.Map <DTO.WorkflowInstance, ENT.WorkflowInstance>(dto);

            return(Mapper.Map <ENT.WorkflowInstance, DTO.WorkflowInstance>(await WorkflowInstanceDomain.Add(element)));
        }