Ejemplo n.º 1
0
        /// <summary>
        /// Saves the specified progress of a step from the specified requestingUser
        /// </summary>
        /// <param name="stepUuid">The step uuid</param>
        /// <param name="requestingUser">The user that made the request</param>
        /// <returns></returns>
        public async Task Add(Guid stepUuid, UserHelper requestingUser)
        {
            if (await _eventStepUserDal.Find(stepUuid, requestingUser.Uuid) != null)
            {
                throw new DuplicateNameException(nameof(stepUuid.ToString));
            }

            await _eventStepUserDal.Add(new EventStepUserDto
            {
                EventStepUuid = stepUuid,
                UserUuid      = requestingUser.Uuid,
                Uuid          = Guid.NewGuid()
            });
        }