aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-08-25 17:33:19 -0500
committerJP Dillingham <jp@dillingham.me>2024-08-25 17:33:19 -0500
commitdb06192dda4369a7a2cb97e74d20ebac771c02c6 (patch)
tree1067c5a102546f3d6bb7538442650d1c05e60add /src
parentc0fbdc7a423ffdc573ce9117faabab0646d35520 (diff)
downloadslskd-db06192dda4369a7a2cb97e74d20ebac771c02c6.tar.gz
fix namespaces
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Events/EventBus.cs3
-rw-r--r--src/slskd/Events/EventsDbContext.cs29
2 files changed, 15 insertions, 17 deletions
diff --git a/src/slskd/Events/EventBus.cs b/src/slskd/Events/EventBus.cs
index 15f75fd0..b38591b3 100644
--- a/src/slskd/Events/EventBus.cs
+++ b/src/slskd/Events/EventBus.cs
@@ -15,7 +15,7 @@
// along with this program. If not, see https://www.gnu.org/licenses/.
// </copyright>
-namespace slskd;
+namespace slskd.Events;
using System;
using System.Collections.Concurrent;
@@ -24,7 +24,6 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Serilog;
-using slskd.Events;
/// <summary>
/// The event bus supporting interoperability and ancillary functions.
diff --git a/src/slskd/Events/EventsDbContext.cs b/src/slskd/Events/EventsDbContext.cs
index 65b09699..9acbc9a4 100644
--- a/src/slskd/Events/EventsDbContext.cs
+++ b/src/slskd/Events/EventsDbContext.cs
@@ -15,27 +15,26 @@
// along with this program. If not, see https://www.gnu.org/licenses/.
// </copyright>
+namespace slskd.Events;
+
using System;
using Microsoft.EntityFrameworkCore;
-namespace slskd.Events
+public class EventsDbContext : DbContext
{
- public class EventsDbContext : DbContext
+ public EventsDbContext(DbContextOptions<EventsDbContext> options)
+ : base(options)
{
- public EventsDbContext(DbContextOptions<EventsDbContext> options)
- : base(options)
- {
- Database.EnsureCreated();
- }
+ Database.EnsureCreated();
+ }
- public DbSet<EventRecord> Events { get; set; }
+ public DbSet<EventRecord> Events { get; set; }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder
- .Entity<EventRecord>()
- .Property(e => e.Timestamp)
- .HasConversion(v => v, v => DateTime.SpecifyKind(v, DateTimeKind.Utc));
- }
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .Entity<EventRecord>()
+ .Property(e => e.Timestamp)
+ .HasConversion(v => v, v => DateTime.SpecifyKind(v, DateTimeKind.Utc));
}
} \ No newline at end of file