InitStorage
When to Use
Sample API Implementation
using Bloqs.App.Engine.Commands;
namespace Templates.SampleApp.Api.Commands;
[EntityCommandHandler]
public class InitStorage : ICommandHandler<InitStorageCommand, InitStorageCommandResult>
{
public Task<InitStorageCommandResult> HandleAsync(
InitStorageCommand command,
CancellationToken cancellationToken = default
)
{
Console.WriteLine($"{AppConstants.App.Name} [API]: Initializing storage...");
// Example: init some data in the database
return Task.FromResult(InitStorageCommandResult.CreateSuccess());
}
}Notes
Last updated