コード例 #1
0
        public TwitterAccountDto UpdateAccount(int id, UpdateTwitterAccountDto dto)
        {
            var socialAccount = _socialAccountService.FindAccount(id, SocialUserSource.Twitter);

            if (socialAccount == null)
            {
                throw SocialExceptions.TwitterAccountNotExists(id);
            }

            socialAccount = Mapper.Map(dto, socialAccount);
            _socialAccountService.Update(socialAccount);

            return(Mapper.Map <TwitterAccountDto>(socialAccount));
        }
コード例 #2
0
        public TwitterAccountDto UpdateAccount(int id, [Required] UpdateTwitterAccountDto dto)
        {
            var account = _appService.UpdateAccount(id, dto);

            return(account);
        }