Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ali-ahmadii/wild-deer-shop
- Owner: Ali-Ahmadii
- Created: 2024-03-16T21:18:10.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-25T23:13:41.000Z (8 months ago)
- Last Synced: 2024-09-29T14:21:25.007Z (about 2 months ago)
- Topics: asp-net-core, bootstrap, csharp, depencyinjection, docker, dotnet, dotnet-core, html-css-javascript, mssqlserver, mvc, razor, redis, rest-api, shop, smtp
- Language: C#
- Homepage:
- Size: 25.7 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Wild Deer Shop
-
Backend:ASP.NET Core,MSS,Docker,Redis,ASP.NET Core WebAPIs,Swagger
Fron End:HTML,CSS,JS,Bootstrap
-
Data Base And Models Of Projects Have Been Designed By DB First ApproachPackages 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 WantAPI Documentation With Swagger
-
For Using API You Must Login As Admin Or HR : Username = Ali & Password = Ali
Data Base
-
In WildDeerDB Foler Database Tables Are Represented In Scripts You Can Use This For Creating You Own Tables In MSSDockerize
-
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
```