Skip to content

Using Background Windows service with Web API in .NET Core

Notifications You must be signed in to change notification settings

Nkambwe/BulkMessenger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using BackgroundWorker Service with Web API C# ASP.NET Core 7 API

Overview

BulkMessenger is a C# ASP.NET Core 7 API designed to showcase the implementation of a background service within an ASP.NET Core API. The project utilizes Entity Framework (EF) with Microsoft SQL Server as the database.

Features

  • Background Service: Demonstrates the usage of the BackgroundService in ASP.NET Core for performing background tasks.
  • Entity Framework (EF): Utilizes EF for data access and management.
  • Microsoft SQL Server: The project is configured to use Microsoft SQL Server as the database.
  • Unit Testing: Demostrate Unit testing Web API Controllers, repositories and services

Prerequisites

  • .NET 7 SDK or later
  • Microsoft SQL Server
  • FakeItEasy
  • FluentAssertion
  • Visual Studio or any preferred code editor

Setup Instructions

  1. Clone the repository: git clone https://github.com/your-username/BulkMessenger.git
  2. Navigate to the project directory: cd BulkMessenger
  3. Update the database connection string in appsettings.json to point to your Microsoft SQL Server instance.
  4. Open the project in Visual Studio or your preferred code editor.
  5. Build and run the project.

Database Migration

To apply the database migrations and update the database schema, run the following commands in the project directory:

dotnet ef migrations add InitialCreate
dotnet ef database update

About

Using Background Windows service with Web API in .NET Core

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages