示例#1
0
        /// <summary>
        ///     Добавление пользователя в "я пойду"
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task AddRespondedUsers(string id,
                                            UserInfo user)
        {
            var validateAct = _validatorUsers.Validate(user);

            if (!validateAct.IsValid)
            {
                throw new ValidationException("Validation failed",
                                              validateAct.Errors);
            }
            await _context.AddRespondedUsers(id,
                                             _mapper.Map <Data.DbModels.UserInfo>(user));
        }