How to connect API with localhost DB

Created by Cheng Kah Poh, Modified on Wed, 22 Nov, 2023 at 4:16 PM by Cheng Kah Poh

Scenario:

I don't have Cloud DB Code, only localhost DB



Solution:


Step 1 - Come to APIV2 Folder (i place my API folder straight to C Drive:)



Step 2 - Look for "appsettings.json" > then open with Notepad


Step 3 - fill in Server instance, and DB Code.


in this API connection string its a little bit different server instance require double backslash.

PC358\\SQL2017DEV




Step 4 - this Connection string step, is to give your Sample DB a code> LocalDb



Step 5 - Now Press Authorize.


Step 6 - Then fill in "LocalDb" into DBcode > Press Authorize


Then press "Close" .

you can start your testing now.



** Learn more about Azure Cloud

** Learn more about QNE Hybrid Cloud Software




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article