how to make your .net core api more resilient