Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/walidabazo/asp.net-core-web-application-with-sql-server-database-connection

Asp.net Core 8 Web Application With SQL Server Database Connection
https://github.com/walidabazo/asp.net-core-web-application-with-sql-server-database-connection

asp-net-core crud-operation fontawsome mssql-database scaffolding

Last synced: 6 days ago
JSON representation

Asp.net Core 8 Web Application With SQL Server Database Connection

Awesome Lists containing this project

README

        

# Asp.net-Core-Web-Application-With-SQL-Server-Database-Connection
Asp.net Core 8 Web Application With SQL Server Database Connection

[![Watch the video](https://img.youtube.com/vi/TmocySu6xiM/0.jpg)](https://youtu.be/TmocySu6xiM)

## Visual Studio 2022 download
## Create New ASP.NET Core Project
## Create Asp.Net Core models
## Create Asp.Net Core models
public class Emplyee
{
public int Id { get; set; }
public string FirestName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public string EmailAddress { get; set; }
public int PhoneNo { get; set; }
}

## Create Database and Table MS SQL Server
## Install Nugets ASP.NET Core ( Entity Framework )
## Create Application Db Context Class
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions contextOptions) : base(contextOptions) { }
public DbSet Emplyees { get; set; }
}
## Configure SQL Database Connection on appsettings.json file
"ConnectionStrings": {
"DefualtConnection": "Data Source=.;Initial Catalog=company;Integrated Security=True;Trust Server Certificate=True"
},
## Register Database Connections on class
builder.Services.AddDbContext(options =>
{
options.UseSqlServer(builder.Configuration.GetConnectionString("DefualtConnection"));
});
## Add-Migrations ASP.NET Core
## Update-Database (Apply Migrations) Asp.Net Core
## Scaffolding in Asp.Net Core
## CRUD Operation
## Add Fontawsome in Asp.Net Core Application