Skip to content

adrianvince7/ReactYellowPagesAPI

Repository files navigation

ReactContactListAPI

Initial Setup

SQL Server Database is used for this solution. The connection string setup points to a hosted database on a remote server. You can use that database without requiring to setup SQL Server on your local machine. Or you can update connection string to point to a local database then run "update-database" to execute EF Core migration.

In other words, you can just run this API and start consuming it, with no code/config changes.

Controller

This is a standard WebAPI written in C# with a Contact Controller that exposes these actions, also available with OpenAPI in Development:

image

The actions take these parameters and return as below:

Task<ActionResult<GlobalResponse>> SaveContact(Contact record)

Task<ActionResult<GlobalResponse>> UpdateContact(Contact record)

Task<ActionResult<GlobalResponse>> DeleteContact(int id)

Task<ActionResult> GetContact(int id)

Task<ActionResult<List>> GetContacts()

Response schema

The response schema looks like below:

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages