Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/walidabazo/asp.net-core-web-application-with-sql-server-database-connection
- Owner: walidabazo
- Created: 2024-01-04T15:38:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-04T15:54:22.000Z (about 1 year ago)
- Last Synced: 2025-02-02T07:41:23.354Z (18 days ago)
- Topics: asp-net-core, crud-operation, fontawsome, mssql-database, scaffolding
- Homepage:
- Size: 1000 Bytes
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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[](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