GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - VBDev2Dev/ContactsSampleAPI: C# .net Core API project start

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
ContactsAPISample
ContactsAPISample
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
ContactsAPISample.sln
ContactsAPISample.sln
 
 
readme.md
readme.md
 
 

Repository files navigation

ASP .Net Core API project Sample

Set up

  1. Create a Database on Local db called ContactsAPISample
    1. View-> Sql Server Object Explorer in Visual Studio
    2. Add (localdb)\MSSQLLocalDB server if it does not exist
    3. Right click databases node under (localdb)\MSSQLLocalDB
    4. Add New database called ContactsAPISample
  2. Go to .Net Core 2.1 downloads and install the latest sdk and Runtime & Hosting Bundle
  3. Right click Solution and choose Restore Nuget Packages
  4. Open Package manager console in visual studio Tools-> Nuget Package Manager-> Package Manager Console
  5. Run Update-Database

Running

Press F5. You will see a swagger page show. This will allow you to play with the different endpoints.
Create a contact (POST) and then run the other api end points. Try things like invalid input, duplicate email addresses, Birthdate in future.

Things to be aware of

This is a quick and dirty and not how I would create a good api. See below

  • I did not use automapper and create API models to translate back and forth between enity framework and api models.
  • I did not create a controller for email addresses.
  • I did not use odata to allow the client to control things like filtering and such

About

C# .net Core API project start

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.