This file contains hidden or 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 class KeyVaultEncryptionSerializer : IBsonSerializer | |
{ | |
private readonly string _elementName; | |
public KeyVaultEncryptionSerializer(string elementName) | |
{ | |
_elementName = elementName; | |
} |
This file contains hidden or 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 class InstallmentMap | |
{ | |
public void Map() | |
{ | |
BsonClassMap.RegisterClassMap<Installment>(map => | |
{ | |
map.AutoMap(); | |
map.SetIgnoreExtraElements(true); | |
map.MapIdMember(x => x.Id); | |
map.MapMember(x => x.Title).SetIsRequired(true); |
This file contains hidden or 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
[BsonIgnoreExtraElements] | |
public class Installment : AggregateRoot | |
{ | |
[BsonId, BsonRepresentation(BsonType.ObjectId)] | |
public string Id { get; protected set; } | |
[BsonRequired] | |
public string Title { get; protected set; } | |
public string Description { get; protected set; } |
This file contains hidden or 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 class Installment : AggregateRoot | |
{ | |
public string Id { get; private set; } | |
public string Title { get; protected set; } | |
public string Description { get; protected set; } | |
public uint InstallmentFrequencyInDays { get; protected set; } | |
public decimal DownPayment { get; protected set; } | |
public uint TotalInstallments { get; protected set; } | |
public Installment(string title, string description, uint installmentFrequencyDays, decimal downPayment, uint totalInstallments) |
This file contains hidden or 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 class Installment | |
{ | |
public string Id { get; set; } | |
public string Title { get; set; } | |
public string Description { get; set; } | |
public uint InstallmentFrequencyInDays { get; set; } | |
public decimal DownPayment { get; set; } | |
public uint TotalInstallments { get; set; } | |
} |
This file contains hidden or 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 class GoodDomainModel | |
{ | |
public string Id {get; protected set; } | |
public Name Name {get; protected set; } | |
private GoodDomainModel(string id, Name name) | |
{ | |
Id = id; | |
Name = name; | |
} |
This file contains hidden or 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 (var system = ActorSystem.Create("example123", config)) | |
{ | |
MongoDbPersistence.Instance.Apply(system); | |
var pActor = system.ActorOf(Props.Create<SectionActor>(), "section-actor"); | |
pActor.Tell(new CheckSeatMessage("1", "1", new List<string> {"A", "B"})); | |
Console.ReadLine(); | |
} |