//-----------------------------------------------------------------------
//
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasVault.WorkerStatus.Database;
using Microsoft.EntityFrameworkCore;
///
/// Interface for the WorkerStatusDbContext. Inherit from this interface to include the WorkerServiceStatus DbSet
/// which is used to store the status of worker services.
///
public interface IWorkerStatusDbContext : IDisposable
{
///
/// Gets or sets the WorkerServiceStatus DbSet.
///
public DbSet WorkerServiceStatuses { get; set; }
///
/// Save changes to the database.
///
/// Count of records affected.
public int SaveChanges();
///
/// Save changes to the database asynchronously.
///
/// CancellationToken instance.
/// Task.
public Task SaveChangesAsync(CancellationToken cancellationToken = default);
}