How do i solve this type error?
//Create
[HttpPost]
public async Task<IActionResult> Create(AddPollRequest addPollRequest)
{
var result = await HttpContext.AuthenticateAsync(
CookieAuthenticationDefaults.AuthenticationScheme
);
addPollRequest.UserId = await UserInformation.GetGoogleId(result); <-- this line
var domainPoll = mapper.Map<Poll>(addPollRequest);
await pollRepository.CreatePollAsync(domainPoll);
return RedirectToAction("Index", "Home");
} //Create
[HttpPost]
public async Task<IActionResult> Create(AddPollRequest addPollRequest)
{
var result = await HttpContext.AuthenticateAsync(
CookieAuthenticationDefaults.AuthenticationScheme
);
addPollRequest.UserId = await UserInformation.GetGoogleId(result); <-- this line
var domainPoll = mapper.Map<Poll>(addPollRequest);
await pollRepository.CreatePollAsync(domainPoll);
return RedirectToAction("Index", "Home");
}why do i get,
CS1503 Argument 1: cannot convert from 'Microsoft.AspNetCore.Authentication.AuthenticateResult' to 'Microsoft.Identity.Client.AuthenticationResultCS1503 Argument 1: cannot convert from 'Microsoft.AspNetCore.Authentication.AuthenticateResult' to 'Microsoft.Identity.Client.AuthenticationResult