In this Often we need to test our database code. There are a lot of ways to do that, but I think the cleanest way is to create a custom attribute for it. What we want to achieve is to create a custom attribute. In this attribute we pass the information need to connect to …