load module settings automatically so that they are part of the ModuleState and can be easily accessed by developers
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Oqtane.Models;
|
||||
@ -14,6 +14,11 @@ namespace Oqtane.Repository
|
||||
_db = context;
|
||||
}
|
||||
|
||||
public IEnumerable<Setting> GetSettings(string entityName)
|
||||
{
|
||||
return _db.Setting.Where(item => item.EntityName == entityName);
|
||||
}
|
||||
|
||||
public IEnumerable<Setting> GetSettings(string entityName, int entityId)
|
||||
{
|
||||
return _db.Setting.Where(item => item.EntityName == entityName)
|
||||
|
Reference in New Issue
Block a user