mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 09:12:57 -07:00
parent
bf043fc76e
commit
0e6462bbd5
31 changed files with 410 additions and 33 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -50,6 +51,10 @@ namespace Ombi.Store.Repository
|
|||
public GlobalSettings Get(string pageName)
|
||||
{
|
||||
var entity = Db.Settings.FirstOrDefault(x => x.SettingsName == pageName);
|
||||
if (entity == null)
|
||||
{
|
||||
throw new ArgumentNullException($"The setting {pageName} does not exist");
|
||||
}
|
||||
Db.Entry(entity).Reload();
|
||||
return entity;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue