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 - CiBuildOrg/WebApi-Boilerplate: Web api boilerplate for kicking off an api project

BranchesTags
Open more actions menu

Latest commit

 

History

138 Commits
138 Commits

Folders and files

NameName
Last commit message
Last commit date
build-results
build-results
 
 
postman
postman
 
 
src/App
src/App
 
 
tests/App.Api.Tests
tests/App.Api.Tests
 
 
tools
tools
 
 
vs
vs
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.cake
build.cake
 
 
build.ps1
build.ps1
 
 

Repository files navigation

Api boilerplate

This will serve as a general base for creating a backend project in .NET. Fair warning: for now I do not fully implement the registration flow. This will eventually connect to the (Xamarin-Starter)[https://github.com/CiBuildOrg/Xamarin-Starter] project. In the near future it will also contain an admin dashboard that will show stats/logins.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need Visual Studio 2017 to compile this. NuGet will take care of the rest.

Installing

Pull the repo, open it in Visual Studio and enable NuGet package restore. I assume you gave your database the name GenericDb. If this is not the case, please change it accordingly in web.config and also in the ContextFactory class.

Similarly, the logs database is currently configured under the name GenericDbLogs. If this is not the case, please change it accordingly in the web.config and also in the LogsContextFactory class.

Generate your sql migration script be like:

For database context

Update-Database -ConfigurationTypeName ContextConfiguration -Script -Verbose -ConnectionString "Data Source=.;Initial Catalog=GenericDb;Integrated Security=True;" -ConnectionProviderName "System.Data.SqlClient" -StartupProjectName App.Api -ProjectName App.Database

This will generate a SQL script that you can then run against your database. In case you modify the database entities you can always add a migration like so:

Add-Migration -Verbose -ConfigurationTypeName ContextConfiguration -ConnectionString "Data Source=.;Initial Catalog=GenericDb;Integrated Security=True;" -ConnectionProviderName "System.Data.SqlClient" MigrationNameHere -StartupProjectName App.Api -ProjectName App.Database

For the database logs context

Update-Database -ConfigurationTypeName LogsContextConfiguration -Script -Verbose -ConnectionString "Data Source=.;Initial Catalog=GenericDbLogs;Integrated Security=True;" -ConnectionProviderName "System.Data.SqlClient" -StartupProjectName App.Api -ProjectName App.Database

This will generate a SQL script that you can then run against your database. In case you modify the database entities you can always add a migration like so:

Add-Migration -Verbose -ConfigurationTypeName LogsContextConfiguration -ConnectionString "Data Source=.;Initial Catalog=GenericDbLogs;Integrated Security=True;" -ConnectionProviderName "System.Data.SqlClient" MigrationNameHere -StartupProjectName App.Api -ProjectName App.Database

Running the tests

Comming up.

Deployment

More to come. Will contain a build script capable of deploy using Cake.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Web api boilerplate for kicking off an api project

Topics

api-boilerplateautofacbackendboilerplateentityframeworkidentityoauthoauth2rolesstartertutorialvisual-studiowebapi

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

7 stars

Watchers

4 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — 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.