This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Marten; | |
using Marten.Events.Projections; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
var builder = Host.CreateApplicationBuilder(); | |
builder.Services.AddMarten(opt => { | |
opt.Connection(builder.Configuration.GetConnectionString("Marten") ?? "Host=localhost; Port=5433; User Id=postgres; Password=pgsql"); | |
opt.Projections.Add<WorkByDayProjection>(ProjectionLifecycle.Inline); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public record MyCommand([property: Identity] Guid Id, string SomeValue); | |
[AttributeUsage(AttributeTargets.Method)] | |
public class MyAttribute: Attribute { | |
public MyAttribute(string something) => Something = something; | |
public string Something {get;} | |
} | |
public static class MyCommandHandler { |
OlderNewer