Skip to content

BookShopAPI developing by the help of ASP.NET Core 2

Notifications You must be signed in to change notification settings

khandakerakash/BookShopAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RESTful API developemnt using ASP.NET Core 2

Here, I have created a simple Bookstore demo application for RESTful API practice purpose.

Application Features

  • I used Postman addons of google chrome browser for checking API data.

And my instructor name is Biswa Nath Ghosh (Tapos) ☺️

Development Setup:

1. Create DbContext class in Contexts Directory:

public class ApplicationDbContext : DbContext
{
    public ApplicationDbContext(DbContextOptions options) : base(options)
    {
    }
}

2. Register the DbContext in the container of the Startup class ConfigureServices method:

var connectionString = Configuration["ConnectionStrings:BookstoreDBConnectionString"];
services.AddDbContext<ApplicationDbContext>(o => o.UseSqlServer(connectionString));
  • Then write the ConnectionStrings in appsettings.Development.json (For the Development Environment) file:
"ConnectionStrings": {
	"BookstoreDBConnectionString": "Server=DESKTOP-ME7EDVE;Database=BookstoreApiDb;Trusted_Connection=True;MultipleActiveResultSets=true"
}

OpenIddict Setup (Token-Based Authentication):

About

BookShopAPI developing by the help of ASP.NET Core 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages