GithubHelp home page GithubHelp logo

ashuhatkar / ashulearn-webapi-sqlserver-efcore-msnugetpkg-crud-v8.0.1 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 200 KB

Basic of building a clean architecture API using .NET Core 8, SQL Server 2022, Entity Framework Core 8 (ORM). Fully managed access to SQL Server and Azure SQL for .NET applications and supports several database providers. A service, repository, factory pattern. .NET package management with NuGet.

Home Page: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/plan

License: MIT License

C# 100.00%
automapper clean-architecture dbcontext entity-framework-core fluent-migrator microservice-patterns repositories rest-api services sql-server-2022

ashulearn-webapi-sqlserver-efcore-msnugetpkg-crud-v8.0.1's Introduction

Setup development environment

  • Clone the repository: https://github.com/ashuhatkar/ashulearn-webapi-sqlserver-efcore-msnugetpkg-crud-v8.0.1
  • (Windows only) Install Visual Studio. Visual Studio contains tooling support for .NET Aspire that you will want to have. Visual Studio 2022 version 17.9 Preview.
    • During installation, ensure that the following are selected:
      • ASP.NET and web development workload.
      • .NET Aspire SDK component in Individual components.
  • Install the latest .NET 8 SDK
  • On Mac/Linux (or if not using Visual Studio), install the Aspire workload with the following commands:
dotnet workload update
dotnet workload install aspire
dotnet restore <project>.sln
  • Install and configure Docker desktop. It's free to use as a part of the Docker Personal subscription for individuals non-commercial open-source projects.

Running the solution

Warning

Remember to ensure that Docker is started

  • Run SQL Server 2022 container image with Docker
  • (Windows only) Run the application from Visual Studio:
  • Open the project src/Services/Nfs.Catalog/src/Nfs.Catalog.sln file in Visual Studio
  • Ensure that Nfs.Catalog.Service.csproj is your startup project
  • Hit Ctrl-F5 to launch Aspire
  • Or run the application from your terminal:
dotnet run --project src/Services/Nfs.Catalog/src/Nfs.Catalog.Service/Nfs.Catalog.Service.csproj

Now listening on: https://localhost:7179

  • Configure local kubernetes
  • Cloud infrastructure subscription

Getting started

The Entity Framework Core tools help with design-time development tasks. They're primarily used to manage Migrations and to scaffold a DbContext and entity types by reverse engineering the schema of a database.

Microsoft.EntityFrameworkCore.Design is for cross-platform command line tooling.

Microsoft.EntityFrameworkCore.Design contains all the design-time logic for Entity Framework Core. It's the code that all of the various tools (PMC cmdlets like Add-Migration, dotnet ef & ef.exe) call into.

If you don't use Migrations or Reverse Engineering, you don't need it.

And when you do need it, we encourage PrivateAssets="All" so it doesn't get published to the server where you almost certainly won't need it.

Prerequisites

Before using the tools:

Usage

PMC Command Usage
Get-Help entityframework Displays information about entity framework commands.
Add-Migration Creates a migration by adding a migration snapshot.
Bundle-Migration Creates an executable to update the database.
Get-DbContext Gets information about a DbContext type.
Drop-Database Drops the database.
Get-Migration Lists available migrations.
Optimize-DbContext Generates a compiled version of the model used by the DbContext.
Remove-Migration Removes the last migration snapshot.
Scaffold-DbContext Generates a DbContext and entity type classes for a specified database. This is called reverse engineering.
Script-DbContext Generates a SQL script from the DbContext. Bypasses any migrations.
Script-Migration Generates a SQL script using all the migration snapshots.
Update-Database Updates the database schema based on the last migration snapshot.

Additional documentation

Feedback

If you encounter a bug or issues with this package,you can open an Github issue. For more details, see getting support.

ashulearn-webapi-sqlserver-efcore-msnugetpkg-crud-v8.0.1's People

Contributors

vstiara avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.