Restful API implemenation for managing contact information using C#, Web API, Repository, Unity, Partial Response,FluentValidation, Exception Handling, Unit tests, HATEOAS, Swagger, AutoMapper, Azure SQL, Azure APP Service, Entity Framework
Sample application is deployed on Azure App Service using Azure SQL. http://contactmanagementapi.azurewebsites.net/swagger
Operations Allowed:
-
GET -gets the list of all contacts, for partial response - use a comma-separated list (fields=firstname,email) to select multiple fields. /api/contact
-
GET By Id - gets the contact information for any id /api/contact/{id}
-
POST - create new contact
-
PUT - update existing contact
-
DELETE - change status from action to inactive
-- ContactManagement.API : Web API project having dependency injection, HATEOAS implementation, Swagger
-- ContactManagement.API.Tests : Web API unit tests
-- ContactManagement.Contracts : Request and response contracts for API
-- ContactManagement.Services : Service layer for fetching data from repository
-- ContactManagement.Models : Holding business entities and uses entity framework code first approach.
-- ContactManagement.Repository : Generic repository for fetching data from SQL Server
Sample application is hosted on Azure APP Service and pointing to Azure SQL.
For running application locally, change connection string in web.config file to point to correct SQL Server.
Test Commit