/CRUD_DotNetCore_Web_API

This project is basic implementation of CRUD operation using DotNet Core Web API. It is a back-end application which performs server side processes.

Primary LanguageC#

CRUD_DotNetCore_Web_API

This project is basic implementation of CRUD operation using DotNet Core Web API. It is a back-end application which performs server side processes.


Language used: C# DB used: SQL Server Framework: Dotnet Core web API


Basic Points in DotNet Core application

  • Program.cs: Entry point of an application
  • Startup.cs: Central Hub of dotnet project | in here Configure() method is where request pipeline is setup
  • launchSettings.json: We can manage Starting URL and also can change the environment

**Dependency Injection

(It helps in decoupling of the project and also in minimizing the changes) DI in dotnetcore are added in startup.ConfigureServices also known as service container.

Three way we can register service/DI in service container

  1. AddSingleton: Same object for every request
  2. AddScoped: Created once per client request
  3. Transient: New Instance created every time

we have used AddScoped in this project

**Important command for Migrations Entity framework was used

  1. dotnet ef migrations add
  2. dotnet ef migration remove //if migration not run yet
  3. dotnet ef database update //running migration

**DTO(data transfer object)

Implemented DTO with the help of AutoMapper.Extentions.Microsoft.DependencyInjection Library -> To implement it we should add another service within Startup.cs -> ConfigureService()