public void Handle(SampleDomainWithEventSourcingPublished e) { using (var db = new SampleDbContext()) { var s = new SampleEntity() { Id = e.Id, Published = true }; var entry = db.Entry <SampleEntity>(s); db.Attach(entry); entry.Property(p => p.Published).IsModified = true; db.SaveChanges(); } }
void Apply(SampleDomainWithEventSourcingPublished e) { _published = true; }