Database connectivity in ASP.net core , .NET Core DB Connection, step by step Step1st: Create ASP.NET Core Project Step2nd: Manage Nuget Package Manager Console Microsoft.EntityFrameworkCore 7.0 Microsoft.EntityFrameworkCore.SqlServer 7.0 Microsoft.EntityFrameworkCore.Tools 7.0 Step3rd: Create Model Class namespace WelcomeProject.Models { public class Product { public int Id { get; set; } public string Name { get; set; } public decimal Price { get; set; } } } Create AppDbContext Class also under model using Microsoft.EntityFrameworkCore; using System.Collections.Generic; namespace WelcomeProject.Models { public class AppDbContext : DbContext { public DbSet<Product> Products { get; set; } private readonly IConfiguration _configuration; ...
Hi, I'm Shiva Gautam. With over 15 years of diverse experience in various IT domains, I am now an entrepreneur focusing on both training and software development. My expertise spans across multiple technologies, and I've authored numerous articles on subjects including Java, Python, REACT, NODE, ANGULAR, Cloud, software testing, Django framework, C#, Flutter, Salesforce, Ruby on Rails, .NET, and more. For additional information, please visit shivaconceptsolution.com and kangaroosoftware.net.