aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/Search/SearchDbContext.cs
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2021-05-31 12:57:36 -0500
committerJP Dillingham <jpdillingham@gmail.com>2021-05-31 12:57:36 -0500
commite6326c6d27c9e6aca60fed2e313d5e62c46ca5d2 (patch)
treea394addc5d8b4cd4d5c61d7bdf570b45104c0849 /src/slskd/Core/Search/SearchDbContext.cs
parent0cb95e8c3af1c2fd17c4122ecac542c4f714b0e7 (diff)
downloadslskd-e6326c6d27c9e6aca60fed2e313d5e62c46ca5d2.tar.gz
move stuff around again
Diffstat (limited to 'src/slskd/Core/Search/SearchDbContext.cs')
-rw-r--r--src/slskd/Core/Search/SearchDbContext.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/slskd/Core/Search/SearchDbContext.cs b/src/slskd/Core/Search/SearchDbContext.cs
new file mode 100644
index 00000000..efb2fdd6
--- /dev/null
+++ b/src/slskd/Core/Search/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; }
+ }
+}