Skip to content

KevinMa0207/ContactAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This Api contains one Controller which includ four endpoints:

  • CreateContactAsync : to create a contact record
  • GetAllContactAsync : to get all contact records with a query model
  • GetContactByIdAsync : to get a contact record by id
  • DeleteContact : to delete a contact record

please refer to this postman collecttion for testing
postman collection link
Note: Localhost port number could be different, Please update based on your local configure

testing work flow

  • first call CreateContactAsync to create couple contact enties. here are some sample call bodies:
{
   "Name":"John",
   "Company":"test",
   "ProfileImageUrl":"asd.jpg",
   "Email":"[email protected]",
   "PersonalPhoneNumber":"123654789",
   "WorkPhoneNumber":"12345678",
   "StreetAddress":"1823 main st",
   "City":"Chicago",
   "State":"IL",
   "Country":"USA",
   "ZipCode":"60611"
} 
{
   "Name":"Kevin",
   "Company":"test",
   "ProfileImageUrl":"asd.jpg",
   "Email":"[email protected]",
   "PersonalPhoneNumber":"123654789",
   "WorkPhoneNumber":"12345678",
   "StreetAddress":"1823 main st",
   "City":"New York",
   "State":"NY",
   "Country":"USA",
   "ZipCode":"16524"
} 
{
   "Name":"Mike",
   "Company":"test",
   "ProfileImageUrl":"asd.jpg",
   "Email":"[email protected]",
   "PersonalPhoneNumber":"123654789",
   "WorkPhoneNumber":"12345678",
   "StreetAddress":"1823 main st",
   "City":"Chicago",
   "State":"IL",
   "Country":"USA",
   "ZipCode":"60611"
} 
	Id
        Name
        Company
        ProfileImageUrl 
        Email 
        Birthdate 
        WorkPhoneNumber 
        PersonalPhoneNumber 
        AddressId 
        StreetAddress 
        City 
        State 
        Country 
        ZipCode 
**Note: will return all the records if query model is empty**
Here are some sample request bodies:
{
	"Name":"John" 	//it will get all the contacts with Name equals "John"
}
{
	"City":"New York" 	//it will get all the contacts with city equals "New York"
}
{
	"City":"Chicago", 
	"State":"IL"		//it will get all the contacts with city equals "Chicago" **AND** state equals "IL"
}

About

Solstice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages