|
@@ -84,6 +84,10 @@ namespace PRSServer
|
|
|
{
|
|
|
_dataModel.AddTable(filter, columns, isdefault, alias, shouldLoad);
|
|
|
}
|
|
|
+ public void AddTable(string alias, CoreTable table, bool isdefault = false)
|
|
|
+ {
|
|
|
+ _dataModel.AddTable(alias, table, isdefault);
|
|
|
+ }
|
|
|
|
|
|
public void LinkTable(Type parenttype, string parentcolumn, Type childtype, string childcolumn, string? parentalias = null,
|
|
|
string? childalias = null, bool isLookup = false)
|
|
@@ -97,6 +101,11 @@ namespace PRSServer
|
|
|
_dataModel.LinkTable(parent, child, parentalias, childalias);
|
|
|
}
|
|
|
|
|
|
+ public void LinkTable(Type parenttype, string parentcolumn, string childalias, string childcolumn, string? parentalias = null, bool isLookup = false)
|
|
|
+ {
|
|
|
+ _dataModel.LinkTable(parenttype, parentcolumn, childalias, childcolumn, parentalias, isLookup);
|
|
|
+ }
|
|
|
+
|
|
|
public void AddChildTable<TParent, TChild>(Expression<Func<TParent, object>> parentcolumn, Expression<Func<TChild, object>> childcolumn,
|
|
|
Filter<TChild>? filter = null, Columns<TChild>? columns = null, bool isdefault = false, string? parentalias = null,
|
|
|
string? childalias = null)
|
|
@@ -126,6 +135,11 @@ namespace PRSServer
|
|
|
return _dataModel.HasTable(type, alias);
|
|
|
}
|
|
|
|
|
|
+ public bool HasTable<TType>(string? alias = null)
|
|
|
+ {
|
|
|
+ return _dataModel.HasTable<TType>(alias);
|
|
|
+ }
|
|
|
+
|
|
|
public void LoadModel(IEnumerable<string> requiredTables, Dictionary<string, IQueryDef>? requiredQueries = null)
|
|
|
{
|
|
|
_dataModel.LoadModel(requiredTables, requiredQueries);
|
|
@@ -156,6 +170,7 @@ namespace PRSServer
|
|
|
public void SetIsDefault<TType>(bool isDefault, string? alias = null) => _dataModel.SetIsDefault<TType>(isDefault, alias);
|
|
|
|
|
|
public void SetShouldLoad<TType>(bool shouldLoad, string? alias = null) => _dataModel.SetShouldLoad<TType>(shouldLoad, alias);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public class RazorReferenceResolver : IReferenceResolver
|