iagor1 / cake_crud

a crud made with sql server, angular and c#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cake_crud

  • A crud made with sql server, angular and c#, to run this project you need :
  • Angular CLI: 14.2.5
  • Node: 16.13.0
  • Package Manager: npm 8.1.0
  • .net 6
  • sql server

How to Run

git clone https://github.com/iagor1/cake_crud

Frontend

 npm install
ng serve -o

Backend

  • install Microsoft.EntityFrameworkCore package
  • install Microsoft.EntityFrameworkCore.SqlServer package
  • install Microsoft.EntityFrameworkCore.Tools package
  • install Microsoft.VisualStudio.Web.CodeGeneration.Design package

Database

  • to create a database from the code we are going to use EntityFramework, first you need add the connection string in the appsettings.json
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=master;Trusted_Connection=True;"
  },
  • then you need to open your package manager on the visual studio and run this code
dotnet ef -v migrations add InicialCreate --context YourContext
  • And then create the database :
dotnet ef -v database update --context YourContext

YourContext its a fake name, this name is the same on your Class Context

  • After this steps you can run properly :)

About

a crud made with sql server, angular and c#


Languages

Language:C# 49.8%Language:TypeScript 39.4%Language:JavaScript 5.8%Language:HTML 4.8%Language:CSS 0.3%