public async Task <IActionResult> Post(FacebookAuthenticationServiceTemplate template)
        {
            FacebookAdto facebookAdto = await
                                        _facebookAuthenticationServiceApplicationService.CreateAsync(_mapper.Map <FacebookAuthenticationServiceTemplate, CreateFacebookAdto>(template));

            return(CreatedAtRoute(RouteDictionary.GetFacebookAuthenticationService, new { facebookAdto.Id },
                                  _resourceBuilder.Build(_mapper.Map <FacebookAdto, FacebookAuthenticationServiceResource>(facebookAdto))));
        }
        public async Task <IActionResult> Get(Guid id)
        {
            FacebookAdto facebookAdto = await
                                        _facebookAuthenticationServiceApplicationService.GetAsync(new GetFacebookAdto
            {
                Id = id
            });

            return(Ok(_resourceBuilder.Build(_mapper.Map <FacebookAdto, FacebookAuthenticationServiceResource>(facebookAdto))));
        }
        public async Task <IActionResult> Put(
            Guid id,
            FacebookAuthenticationServiceResource resource)
        {
            ChangeFacebookAdto changeFacebookAdto = new ChangeFacebookAdto
            {
                Id                        = id,
                Name                      = resource.Name,
                ClientId                  = resource.ClientId,
                ClientSecret              = resource.ClientSecret,
                GrantAccessTokenUrl       = resource.GrantAccessTokenUrl,
                ValidateAccessTokenUrl    = resource.ValidateAccessTokenUrl,
                ClientGrantAccessTokenUrl = resource.ClientGrantAccessTokenUrl,
                AppAccessToken            = resource.AppAccessToken,
                Version                   = resource.Version
            };

            FacebookAdto facebookAdto = await
                                        _facebookAuthenticationServiceApplicationService.ChangeAsync(changeFacebookAdto);

            return(Ok(_resourceBuilder.Build(_mapper.Map <FacebookAdto, FacebookAuthenticationServiceResource>(facebookAdto))));
        }