aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/Search/Persistence
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-05-28 15:02:02 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-05-28 15:02:02 -0500
commitd3688262afeb01cf5ffd6df0c5ac2cbb1a8a6459 (patch)
tree88a7a27f452c325ab89d026a84e4bbbb5c1e9030 /src/slskd/Core/Search/Persistence
parent117cd518209ad190492bcd483f1ca54f696ceb34 (diff)
downloadslskd-d3688262afeb01cf5ffd6df0c5ac2cbb1a8a6459.tar.gz
move SearchDbContext
Diffstat (limited to 'src/slskd/Core/Search/Persistence')
-rw-r--r--src/slskd/Core/Search/Persistence/SearchDbContext.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/slskd/Core/Search/Persistence/SearchDbContext.cs b/src/slskd/Core/Search/Persistence/SearchDbContext.cs
new file mode 100644
index 00000000..efb2fdd6
--- /dev/null
+++ b/src/slskd/Core/Search/Persistence/SearchDbContext.cs
@@ -0,0 +1,32 @@
+// <copyright file="SearchDbContext.cs" company="slskd Team">
+// Copyright (c) slskd Team. All rights reserved.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see https://www.gnu.org/licenses/.
+// </copyright>
+
+namespace slskd.Search
+{
+ using Microsoft.EntityFrameworkCore;
+
+ public class SearchDbContext : DbContext
+ {
+ public SearchDbContext(DbContextOptions<SearchDbContext> options)
+ : base(options)
+ {
+ Database.EnsureCreated();
+ }
+
+ public DbSet<Search> Searches { get; set; }
+ }
+}