Senhores, bom dia!
Quando tento executar o get no postman aparece a informação abaixo
AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types:
List1 -> List
1
System.Collections.Generic.List1[[FilmesApi.Models.Cinema, FilmesApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]] -> System.Collections.Generic.List
1[[FilmesApi.Data.Dtos.ReadCinemaDto, FilmesApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]
---> AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types: Cinema -> ReadCinemaDto FilmesApi.Models.Cinema -> FilmesApi.Data.Dtos.ReadCinemaDto
Type Map configuration: Cinema -> ReadCinemaDto FilmesApi.Models.Cinema -> FilmesApi.Data.Dtos.ReadCinemaDto
Destination Member: ReadEnderecoDto
---> AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
Mapping types: EnderecoProxy -> ReadEnderecoDto Castle.Proxies.EnderecoProxy -> FilmesApi.Data.Dtos.ReadEnderecoDto
Destination Member: ReadEnderecoDto
at lambda_method123(Closure , Endereco , ReadEnderecoDto , ResolutionContext )
at lambda_method117(Closure , Object , List1 , ResolutionContext ) --- End of inner exception stack trace --- at lambda_method117(Closure , Object , List
1 , ResolutionContext )
--- End of inner exception stack trace ---
at lambda_method117(Closure , Object , List`1 , ResolutionContext )
at FilmesApi.Controllers.CinemaController.RecuperaCinemas() in C:\Users\bisma\source\repos\FilmesApi\FilmesApi\Controllers\CinemaController.cs:line 36
at lambda_method113(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
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()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.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: / Connection: keep-alive Host: localhost:7221 User-Agent: PostmanRuntime/7.34.0 Accept-Encoding: gzip, deflate, br Postman-Token: ecaaeff5-6079-4481-9e05-1d834c367517