https://github.com/faouzimohamed/taradjam-backend
Web service exposing an Api-REST for the web application Taradjam (https://taradjam.vercel.app)
https://github.com/faouzimohamed/taradjam-backend
api-rest asp-net-core dotnet6 sqlserver translation
Last synced: 2 months ago
JSON representation
Web service exposing an Api-REST for the web application Taradjam (https://taradjam.vercel.app)
- Host: GitHub
- URL: https://github.com/faouzimohamed/taradjam-backend
- Owner: faouziMohamed
- License: mit
- Created: 2022-08-19T22:25:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T21:40:01.000Z (almost 2 years ago)
- Last Synced: 2025-06-15T11:07:17.088Z (about 1 year ago)
- Topics: api-rest, asp-net-core, dotnet6, sqlserver, translation
- Language: C#
- Homepage: https://taradjam.azurewebsites.net
- Size: 5.8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Data Translate (Backend)
This project is a migration of the backend of the project [Data-translate](https://github.com/faouziMohamed/Data-translate),
from Nextjs (under the hood likely nodejs server) and MongoDb to Asp.Net Core and Sql Server
## Getting started
- First open the solution using either Rider or Visual Studio 2022 (Mandatory for dotnet 6+)
- Install the [Entity Framework CLI](https://docs.microsoft.com/en-us/ef/core/cli/dotnet) (if you are not using Visual Studio)
- Make sure to have [Microsoft Sql Server (Express)](https://www.microsoft.com/en-gb/sql-server/sql-server-downloads) installed on your computer
### Creating the database (MS SQL Server)
Run the migration commande to create the database.
_Feel free to change connection string to set other values. By default the database that will be created is called *Data-Translate*_
1. If you are using Rider or other IDE than Visual Studio, open a terminal in the ```km.Translate.DataLib``` project and run the command below:
--> creating the first migration Then applying it to create the database with tables
```bash
dotnet ef migrations add InitialMigration -o Data/Migrations
dotnet ef database update
```
1. If you are using Visual Studio, set `km.Translate.DataLib` as Startup project, open the Package Manager Console and run the command below:
```
Add-Migration InitialMigration -o Data/Migrations
Update-Database
```
### Initializing the database with seed Data
This step use seed data located on the [km.Translate.DataLib/dataSettings.json](km.Translate.DataLib/dataSettings.json) to populate the database
1. If you are in Visual Studio, set `km.Translate.Api` as Startup Project
1. Start the development server (`km.Translate.Api`), Swagger should Open exposing available Endpoints
1. Use the endpoint `/api/Starter/initialize` to initialize the database. It may take a moment before it finish initialization