Using Entity Framework 6 in an ASP.NET Core Web API.
I have the following controller:
[Route("[controller]/[action]")]
[ApiController]
public class ContactController : ControllerBase
{
FalconDataContext _context;
public ContactController(FalconDataContext context)
{
_context = context;
}
[HttpGet]
public async Task<ActionResult<IEnumerable<ContactModel>>> GetAllContacts()
{
var contacts = await _context.Contacts.ToListAsync();
return Ok(contacts);
}
}
When I run this in Swagger I get
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
on the call to DbContext.
This just started happening. It was working a few day ago. What is this and how do I solve it?