Skip to content

Commit 9656962

Browse files
committed
- Release v1.0.0
1 parent 759fe8f commit 9656962

File tree

12 files changed

+46
-37
lines changed

12 files changed

+46
-37
lines changed

docs/SourceFlow.Net-README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ public class TransactionHistoryViewModel : IViewModel
293293

294294
### 6. Implement Views for Event Projections
295295

296-
**Enhanced Feature: Store operations now return the persisted entity**, which can be useful when the store modifies the entity (e.g., sets database-generated IDs or updates timestamps). Views serve as **Event Subscribers** that project events into view models for efficient querying.
296+
**Views** serve as **Event Subscribers** that project events into view models for efficient querying.
297297

298298
```csharp
299299
using SourceFlow.Projections;
@@ -561,7 +561,7 @@ public class BankingService
561561

562562
## 🏗️ Architecture Flow
563563

564-
<img width="1959" height="649" alt="Architecture" src="https://github.com/user-attachments/assets/3ceb5df2-f01c-4316-829a-0350b399cba2" />
564+
> Please see [Readme](https://github.com/CodeShayk/SourceFlow.Net/blob/master/README.md) to get a detailed view on Architecture and its components.
565565
566566
---
567567

@@ -624,7 +624,6 @@ The Entity Framework provider offers:
624624
- Resilience policies with automatic retry and circuit breaker
625625
- OpenTelemetry integration for database operations
626626
- Configurable connection strings per store type
627-
- **Enhanced Return Types**: Store operations return the persisted entity for additional processing
628627

629628
Install with:
630629
```bash
@@ -682,8 +681,8 @@ services.AddLogging(configure => configure.AddConsole().SetMinimumLevel(LogLevel
682681

683682
- **Full Documentation**: [GitHub Wiki](https://github.com/CodeShayk/SourceFlow.Net/wiki)
684683
- **API Reference**: [NuGet Package Documentation](https://www.nuget.org/packages/SourceFlow.Net)
685-
- **Release Notes**: [CHANGELOG](../CHANGELOG.md)
686-
- **Architecture Patterns**: [Design Patterns Guide](https://github.com/CodeShayk/SourceFlow.Net/wiki/Architecture-Patterns)
684+
- **Release Notes**: [CHANGELOG](https://github.com/CodeShayk/SourceFlow.Net/blob/v1.0.0/CHANGELOG.md)
685+
- **Architecture Patterns**: [Design Patterns Guide](https://github.com/CodeShayk/SourceFlow.Net/wiki#architecture-overview)
687686

688687
## 🤝 Contributing
689688

docs/SourceFlow.Stores.EntityFramework-README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ The provider includes built-in Polly resilience policies for:
124124
- [Full Documentation](https://github.com/CodeShayk/SourceFlow.Net/wiki)
125125
- [GitHub Repository](https://github.com/CodeShayk/SourceFlow.Net)
126126
- [Report Issues](https://github.com/CodeShayk/SourceFlow.Net/issues)
127-
- [Release Notes](https://github.com/CodeShayk/SourceFlow.Net/blob/master/CHANGELOG.md)
127+
- [Release Notes](https://github.com/CodeShayk/SourceFlow.Net/blob/v1.0.0/CHANGELOG.md)
128128

129129
## Support
130130

src/SourceFlow.Net.EntityFramework/SourceFlow.Stores.EntityFramework.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
@@ -14,6 +14,7 @@
1414
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
1515
<Description>Entity Framework Core persistence provider for SourceFlow.Net. Provides production-ready implementations of ICommandStore, IEntityStore, and IViewModelStore using Entity Framework Core 9.0. Features include flexible configuration with separate or shared connection strings per store type, SQL Server support, Polly-based resilience and retry policies, OpenTelemetry instrumentation for database operations, and full support for .NET 8.0, .NET 9.0, and .NET 10.0. Seamlessly integrates with SourceFlow.Net core framework for complete event sourcing persistence.</Description>
1616
<Copyright>Copyright (c) 2025 CodeShayk</Copyright>
17+
<PackageIcon>ninja-icon-16.png</PackageIcon>
1718
<PackageReadmeFile>docs\SourceFlow.Stores.EntityFramework-README.md</PackageReadmeFile>
1819
<AssemblyVersion>1.0.0</AssemblyVersion>
1920
<FileVersion>1.0.0</FileVersion>
@@ -24,6 +25,7 @@
2425
<LangVersion>latest</LangVersion>
2526
<AssemblyName>SourceFlow.Stores.EntityFramework</AssemblyName>
2627
<AssemblyTitle>SourceFlow.Stores.EntityFramework</AssemblyTitle>
28+
<PackageLicenseFile>LICENSE</PackageLicenseFile>
2729
</PropertyGroup>
2830

2931
<ItemGroup>
@@ -50,6 +52,14 @@
5052
<Pack>True</Pack>
5153
<PackagePath>\docs</PackagePath>
5254
</None>
55+
<None Include="..\..\Images\ninja-icon-16.png">
56+
<Pack>True</Pack>
57+
<PackagePath>\</PackagePath>
58+
</None>
59+
<None Include="..\..\LICENSE">
60+
<Pack>True</Pack>
61+
<PackagePath>\</PackagePath>
62+
</None>
5363
</ItemGroup>
5464

5565
</Project>

src/SourceFlow/Projections/View.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,22 @@ async Task IView.Apply<TEvent>(TEvent @event)
5959
/// <summary>
6060
/// Finds the view model by identifier.
6161
/// </summary>
62-
/// <typeparam name="TViewModel"></typeparam>
62+
/// <typeparam name="TModel"></typeparam>
6363
/// <param name="id"></param>
6464
/// <returns></returns>
65-
protected Task<TViewModel> Find<TViewModel>(int id) where TViewModel : class, IViewModel
65+
protected Task<TModel> Find<TModel>(int id) where TModel : class, IViewModel
6666
{
67-
return viewModelStore.Find<TViewModel>(id);
67+
return viewModelStore.Find<TModel>(id);
6868
}
6969
/// <summary>
7070
/// Projects the specified view model.
7171
/// </summary>
72-
/// <typeparam name="TViewModel"></typeparam>
72+
/// <typeparam name="TModel"></typeparam>
7373
/// <param name="viewModel"></param>
7474
/// <returns>The persisted view model</returns>
75-
protected Task<TViewModel> Persist<TViewModel>(TViewModel viewModel) where TViewModel : class, IViewModel
75+
protected Task<TModel> Persist<TModel>(TModel viewModel) where TModel : class, IViewModel
7676
{
77-
return viewModelStore.Persist<TViewModel>(viewModel);
77+
return viewModelStore.Persist<TModel>(viewModel);
7878
}
7979
}
8080
}

tests/SourceFlow.Core.Tests/E2E/E2E.Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public async Task EndToEnd_AccountLifecycle_WorksAsExpected()
7474
// Get current state and assertions
7575
var account = await _viewRepository.Find<AccountViewModel>(_accountId);
7676
Assert.That(account, Is.Not.Null);
77-
Assert.That(_accountId, Is.EqualTo(account.Id));
78-
Assert.That("John Doe", Is.EqualTo(account.AccountName));
79-
Assert.That(1000m + 500m - 200m + 100m, Is.EqualTo(account.CurrentBalance));
77+
Assert.That(account.Id, Is.EqualTo(_accountId));
78+
Assert.That(account.AccountName, Is.EqualTo("John Doe"));
79+
Assert.That(account.CurrentBalance, Is.EqualTo(1000m + 500m - 200m + 100m));
8080
Assert.That(account.TransactionCount, Is.GreaterThanOrEqualTo(3));
8181
Assert.That(account.IsClosed, Is.False);
8282

tests/SourceFlow.Core.Tests/Impl/AggregateFactoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public async Task Create_ReturnsAggregateInstance()
2424
var factory = new AggregateFactory(spMock.Object);
2525
var result = await factory.Create<IAggregate>();
2626
Assert.IsNotNull(result);
27-
Assert.AreSame(aggregateMock.Object, result);
27+
Assert.That(result, Is.SameAs(aggregateMock.Object));
2828
}
2929
}
3030
}

tests/SourceFlow.Core.Tests/Interfaces/IViewModelRepositoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public async Task GetByIdAsync_ReturnsModel()
1515
mock.Setup(r => r.Find<DummyViewModel>(1)).ReturnsAsync(new DummyViewModel { Id = 1 });
1616
var result = await mock.Object.Find<DummyViewModel>(1);
1717
Assert.That(result, Is.Not.Null);
18-
Assert.That(1, Is.EqualTo(result.Id));
18+
Assert.That(result.Id, Is.EqualTo(1));
1919
}
2020

2121
[Test]

tests/SourceFlow.Core.Tests/Messaging/CommandTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public void Constructor_InitializesProperties()
2424
var payload = new DummyPayload { EntityId = 42 };
2525
var command = new DummyCommand(42, payload);
2626
Assert.IsNotNull(command.Metadata);
27-
Assert.AreEqual("DummyCommand", command.Name);
28-
Assert.AreSame(payload, command.Payload);
27+
Assert.That(command.Name, Is.EqualTo("DummyCommand"));
28+
Assert.That(command.Payload, Is.SameAs(payload));
2929
}
3030

3131
[Test]
@@ -34,8 +34,8 @@ public void ICommandPayload_GetSet_WorksCorrectly()
3434
var payload = new DummyPayload { EntityId = 7 };
3535
var command = new DummyCommand(7, new DummyPayload());
3636
((ICommand)command).Payload = payload;
37-
Assert.AreSame(payload, command.Payload);
38-
Assert.AreSame(payload, ((ICommand)command).Payload);
37+
Assert.That(command.Payload, Is.SameAs(payload));
38+
Assert.That(((ICommand)command).Payload, Is.SameAs(payload));
3939
}
4040
}
4141
}

tests/SourceFlow.Core.Tests/Messaging/EventTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public void Constructor_InitializesProperties()
2323
var payload = new DummyEntity { Id = 99 };
2424
var ev = new DummyEvent(payload);
2525
Assert.IsNotNull(ev.Metadata);
26-
Assert.AreEqual("DummyEvent", ev.Name);
27-
Assert.AreSame(payload, ev.Payload);
26+
Assert.That(ev.Name, Is.EqualTo("DummyEvent"));
27+
Assert.That(ev.Payload, Is.SameAs(payload));
2828
}
2929

3030
[Test]
@@ -33,8 +33,8 @@ public void IEventPayload_GetSet_WorksCorrectly()
3333
var payload = new DummyEntity { Id = 123 };
3434
var ev = new DummyEvent(new DummyEntity());
3535
((IEvent)ev).Payload = payload;
36-
Assert.AreSame(payload, ev.Payload);
37-
Assert.AreSame(payload, ((IEvent)ev).Payload);
36+
Assert.That(ev.Payload, Is.SameAs(payload));
37+
Assert.That(((IEvent)ev).Payload, Is.SameAs(payload));
3838
}
3939
}
4040
}

tests/SourceFlow.Core.Tests/Messaging/MetadataTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class MetadataTests
99
public void Constructor_InitializesProperties()
1010
{
1111
var metadata = new Metadata();
12-
Assert.AreNotEqual(Guid.Empty, metadata.EventId);
12+
Assert.That(metadata.EventId, Is.Not.EqualTo(Guid.Empty));
1313
Assert.That(metadata.OccurredOn, Is.Not.EqualTo(default(DateTime)));
1414
Assert.IsFalse(metadata.IsReplay);
1515
Assert.IsNotNull(metadata.Properties);
@@ -27,11 +27,11 @@ public void Properties_CanBeSetAndGet()
2727
metadata.OccurredOn = now;
2828
metadata.SequenceNo = 42;
2929
metadata.Properties["foo"] = 123;
30-
Assert.AreEqual(guid, metadata.EventId);
30+
Assert.That(metadata.EventId, Is.EqualTo(guid));
3131
Assert.IsTrue(metadata.IsReplay);
32-
Assert.AreEqual(now, metadata.OccurredOn);
33-
Assert.AreEqual(42, metadata.SequenceNo);
34-
Assert.AreEqual(123, metadata.Properties["foo"]);
32+
Assert.That(metadata.OccurredOn, Is.EqualTo(now));
33+
Assert.That(metadata.SequenceNo, Is.EqualTo(42));
34+
Assert.That(metadata.Properties["foo"], Is.EqualTo(123));
3535
}
3636
}
3737
}

0 commit comments

Comments
 (0)