Added all projects

We are almost working.
This commit is contained in:
2026-07-13 17:29:43 +02:00
parent 7bcb1802af
commit bf16b7b807
20 changed files with 322 additions and 52 deletions
@@ -0,0 +1,16 @@
namespace FinancialApi.Application;
public record Account(int Id, decimal Balance)
{
public Account ApplyFee(decimal amount)
{
if (amount <= 0)
throw new ArgumentException("Fee must be positive.");
if (Balance - amount < 0)
throw new InvalidOperationException("Insufficient funds.");
// Returns a brand new record with the updated balance
return this with { Balance = Balance - amount };
}
}
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>