Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ali-ahmadii/wild-deer-shop

Full Stack Shop With ASP.NET Core
https://github.com/ali-ahmadii/wild-deer-shop

asp-net-core bootstrap csharp depencyinjection docker dotnet dotnet-core html-css-javascript mssqlserver mvc razor redis rest-api shop smtp

Last synced: about 1 month ago
JSON representation

Full Stack Shop With ASP.NET Core

Awesome Lists containing this project

README

        

Wild Deer Shop
-
Backend:ASP.NET Core,MSS,Docker,Redis,ASP.NET Core WebAPIs,Swagger




dotnetcore
Docker
Redis
MSS
Swagger




Fron End:HTML,CSS,JS,Bootstrap




HTML
CSS
CSS
BootStrap




-
Data Base And Models Of Projects Have Been Designed By DB First Approach

Packages In The Project
-
- dotnet add package BCrypt.Net-Next
dot net add packages Microsoft.EntityFrameworkCore
dot net add packages Microsoft.EntityFrameworkCore.Design
dot net add packages Microsoft.EntityFrameworkCore.Realtional
dot net add packages Microsoft.EntityFrameworkCore.SqlServer
dot net add packages Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis
dotnet add package Swashbuckle.AspNetCore

Connection To Database
-
For Connecting To Your Own SQL Server You Must Change appsetting.json file Connection String For Example
```C#
"ConnectionString": "Data Source=.;Initial Catalog=WildDeer;Integrated Security=True;Trust Server Certificate=True"
//Data Source = . if we are in localhost
```
And Also Add SQL Server Service To Program.cs file
```C#
builder.Services.AddEntityFrameworkSqlServer().AddDbContext(config =>
{
config.UseSqlServer("ConnectionString");
});
```

Caching With Redis
-
I Have Used Redis For Caching Approaches



After Installing StackExchangeRedis Package We Should Do Several Things In Program.cs File:


```C#
builder.Services.AddStackExchangeRedisCache(action => {
var connection = "localhost:6379"; //remember this port number it will be needed later
action.Configuration = connection;
});
```
Then We Will Use Docker For Our Approach


In CMD Or Package Manager Console If You Use Visual Studio Write This Command:
```CMD
docker pull redis
```
Then
```CMD
docker run -p 6379:6379 --name some-redis -d redis
```
6379 Is What We Determined In Program.cs File And
some-redis Is Name Of Our Image, You Can Choose Whatever You Want

API Documentation With Swagger
-
For Using API You Must Login As Admin Or HR : Username = Ali & Password = Ali


BootStrap

Data Base
-
In WildDeerDB Foler Database Tables Are Represented In Scripts You Can Use This For Creating You Own Tables In MSS

Dockerize
-
In DockerFile I've Writed Needed Commands For Building Image


For Building Image You Should Write This Command In Application Directory
```CMD
docker build -t .
```
Now You Have Your Image On Docker And For Seeing This Write This Command
```CMD
docker image ls
```
Now For Running Write This Command In Your Windows Or VPS That You've Got
```CMD
docker run
```