Após baixar o projeto a ser utilizado nas aulas e executar pela primeira vez, aparece a seguinte mensagem de erro:
System.InvalidOperationException
HResult=0x80131509
Message=An exception has been raised that is likely due to a transient failure. Consider enabling transient error resiliency by adding 'EnableRetryOnFailure' to the 'UseSqlServer' call.
Source=Microsoft.EntityFrameworkCore.SqlServer
StackTrace:
em Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func3 operation, Func
3 verifySucceeded)
em Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable1.Enumerator.MoveNext() em System.Collections.Generic.List
1..ctor(IEnumerable1 collection) em System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
em ScreenSound.Banco.DAL1.Listar() em C:\Sistemas\c074114\projects\ScreenSound-Curso4-master\ScreenSound.Shared.Dados\Banco\DAL.cs:linha 20 em ScreenSound.API.Endpoints.ArtistasExtensions.<>c.<AddEndPointsArtistas>b__0_0(DAL
1 dal) em C:\Sistemas\c074114\projects\ScreenSound-Curso4-master\ScreenSound.API\Endpoints\ArtistasExtensions.cs:linha 17
em Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
em Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.d__5.MoveNext()
Esta exceção foi gerada originalmente nesta pilha de chamadas: Microsoft.Data.SqlClient.SqlInternalConnection.OnError(Microsoft.Data.SqlClient.SqlException, bool, System.Action<System.Action>) Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(Microsoft.Data.SqlClient.TdsParserStateObject, bool, bool) Microsoft.Data.SqlClient.TdsParser.TryRun(Microsoft.Data.SqlClient.RunBehavior, Microsoft.Data.SqlClient.SqlCommand, Microsoft.Data.SqlClient.SqlDataReader, Microsoft.Data.SqlClient.BulkCopySimpleResultSet, Microsoft.Data.SqlClient.TdsParserStateObject, out bool) Microsoft.Data.SqlClient.TdsParser.Run(Microsoft.Data.SqlClient.RunBehavior, Microsoft.Data.SqlClient.SqlCommand, Microsoft.Data.SqlClient.SqlDataReader, Microsoft.Data.SqlClient.BulkCopySimpleResultSet, Microsoft.Data.SqlClient.TdsParserStateObject) Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(bool) Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(Microsoft.Data.SqlClient.ServerInfo, string, System.Security.SecureString, bool, Microsoft.Data.ProviderBase.TimeoutTimer, bool) Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(Microsoft.Data.SqlClient.ServerInfo, string, System.Security.SecureString, bool, Microsoft.Data.SqlClient.SqlConnectionString, Microsoft.Data.SqlClient.SqlCredential, Microsoft.Data.ProviderBase.TimeoutTimer) Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(Microsoft.Data.ProviderBase.TimeoutTimer, Microsoft.Data.SqlClient.SqlConnectionString, Microsoft.Data.SqlClient.SqlCredential, string, System.Security.SecureString, bool) Microsoft.Data.SqlClient.SqlInternalConnectionTds.SqlInternalConnectionTds(Microsoft.Data.ProviderBase.DbConnectionPoolIdentity, Microsoft.Data.SqlClient.SqlConnectionString, Microsoft.Data.SqlClient.SqlCredential, object, string, System.Security.SecureString, bool, Microsoft.Data.SqlClient.SqlConnectionString, Microsoft.Data.SqlClient.SessionData, bool, string, Microsoft.Data.ProviderBase.DbConnectionPool) Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(Microsoft.Data.Common.DbConnectionOptions, Microsoft.Data.Common.DbConnectionPoolKey, object, Microsoft.Data.ProviderBase.DbConnectionPool, System.Data.Common.DbConnection, Microsoft.Data.Common.DbConnectionOptions) ... [Pilha de Chamadas Truncada]
Exceção interna 1: SqlException: Cannot open database "ScreenSoundV1" requested by the login. The login failed. Login failed for user ''.
Como resolvo isso?