Esempio n. 1
0
        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="Users"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public async Task <ResponseMessage <bool> > AddRanageAsync(List <UserEditRequest> Users, CancellationToken cancellationToken)
        {
            var response = new ResponseMessage <bool>()
            {
                Extension = false
            };

            if (Users.Count == 0)
            {
                throw new ArgumentNullException();
            }
            var list = _mapper.Map <List <User> >(Users);

            response.Extension = await _userStore.AddRangeEntityAsync(list);

            return(response);
        }