How can use path method in c#.
I have obtains this is error:
AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types:
Producto -> ProductoPatchDTO
SolutionFarma.Models.Producto -> SolutionFarma.DTOs.ProductoPatchDTO
Type Map configuration:
Producto -> ProductoPatchDTO
SolutionFarma.Models.Producto -> SolutionFarma.DTOs.ProductoPatchDTO
Destination Member:
Farmacias
---> AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
Mapping types:
ProductoFarmacia -> ProductoFarmaciaPatchDTO
SolutionFarma.Models.ProductoFarmacia -> SolutionFarma.DTOs.ProductoFarmaciaPatchDTO
at lambda_method94(Closure , ProductoFarmacia , ProductoFarmaciaPatchDTO , ResolutionContext )
at lambda_method93(Closure , Object , ProductoPatchDTO , ResolutionContext )
--- End of inner exception stack trace ---
at lambda_method93(Closure , Object , ProductoPatchDTO , ResolutionContext )
at SolutionFarma.Controllers.ProductoController.Patch(Int32 id, JsonPatchDocument`1 patchDocument) in C:\Users\pozoj\source\repos\Farmacia\Farmacia\Controllers\ProductoController.cs:line 115
at lambda_method5(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
HEADERS
=======
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 273
Content-Type: application/json
Host: localhost:44394
User-Agent: PostmanRuntime/7.28.4
Postman-Token: 884acda7-8fe1-46da-9bb0-a168fe8bfcc2