1) Create Database and Table as mentioned below queries create table products(ProdId int Primary key, ProductName varchar(20), Price int ) insert into products (ProdId, ProductName, Price ) values (1,'Laptop','45000'); insert into products (ProdId, ProductName, Price ) values (2,'Mouse','500'); insert into products (ProdId, ProductName, Price ) values (3,'Router','1800'); select * from products; 2) Create ASP.NET Core API Project Install NuGet Packages 3) AppSettings.json { "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "ConnectionStrings": { "DbConnection": "Server=Server_name; Database=ProductManagementCrud; User Id=sa; password=oj#$kdfn; TrustServerCertificate=True;" }, "AllowedHosts": "*" } 4) Model - Product.cs namespace ProductManagmentCRUD.Mo...
Comments
Post a Comment