Skip to content

Commit

Permalink
order command api
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad088 committed Nov 2, 2024
1 parent fd46315 commit c953a86
Show file tree
Hide file tree
Showing 59 changed files with 1,089 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static class EndpointExtensions
{
public static IServiceCollection AddEndpoints(this IServiceCollection services, Assembly assembly)
{
ServiceDescriptor[] serviceDescriptors = assembly.DefinedTypes
var serviceDescriptors = assembly.DefinedTypes
.Where(type => type is { IsAbstract: false, IsInterface: false } && type.IsAssignableTo(typeof(IEndpoint)))
.Select(type => ServiceDescriptor.Transient(typeof(IEndpoint), type))
.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ namespace Order.Command.API.Common;

public static class HealthChecksExtension
{
public static IServiceCollection AddHealthChecks(this IServiceCollection services, ConfigurationManager configuration)
public static IServiceCollection AddHealthChecks(this IServiceCollection services,
ConfigurationManager configuration)
{
services.AddDefaultHealthChecks();
// should add db health check here

return services;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace Order.Command.API.Configurations;

internal sealed record DatabaseConfigurations
{
[ConfigurationKeyName("ConnectionStrings:Database"), Required]
[ConfigurationKeyName("ConnectionStrings:Database")]
[Required]
public required string SqlDatabase { get; init; }
}
Loading

0 comments on commit c953a86

Please sign in to comment.