public async Task <IActionResult> Post(GoogleAuthenticationServiceTemplate template) { GoogleAdto googleAdto = await _googleAuthenticationServiceApplicationService.CreateAsync(_mapper.Map <GoogleAuthenticationServiceTemplate, CreateGoogleAdto>(template)); return(CreatedAtRoute(RouteDictionary.GetGoogleAuthenticationService, new { googleAdto.Id }, _resourceBuilder.Build(_mapper.Map <GoogleAdto, GoogleAuthenticationServiceResource>(googleAdto)))); }
public Task <GoogleAdto> CreateAsync(CreateGoogleAdto createGoogleAdto) { return(_securityApplicationService.SecureAsync(() => _googleAuthenticationServiceApplicationService.CreateAsync(createGoogleAdto), DefaultAuthorisationContext.Create(AuthorisationResource.AuthenticationService, AuthorisationAction.Create))); }