Addition of global business settings for static server use (equivalent of v7 Global object)

This commit is contained in:
2020-03-24 23:41:13 +00:00
parent 942a43da6c
commit fa1e65935e
6 changed files with 82 additions and 5 deletions

View File

@@ -5,6 +5,7 @@ namespace AyaNova.Models
{
public partial class AyContext : DbContext
{
public virtual DbSet<GlobalBizSettings> GlobalBizSettings { get; set; }
public virtual DbSet<Event> Event { get; set; }
public virtual DbSet<SearchDictionary> SearchDictionary { get; set; }
public virtual DbSet<SearchKey> SearchKey { get; set; }
@@ -20,8 +21,8 @@ namespace AyaNova.Models
public virtual DbSet<DataListView> DataListView { get; set; }
public virtual DbSet<Tag> Tag { get; set; }
public virtual DbSet<FormCustom> FormCustom { get; set; }
public virtual DbSet<PickListTemplate> PickListTemplate { get; set; }
public virtual DbSet<PickListTemplate> PickListTemplate { get; set; }
//Note: had to add this constructor to work with the code in startup.cs that gets the connection string from the appsettings.json file
//and commented out the above on configuring

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace AyaNova.Models
{
public partial class GlobalBizSettings
{
public long Id { get; set; }//this is always 1 as there is only ever one single global biz object
public uint ConcurrencyToken { get; set; }
//Global settings
//Picklist and other searches override the normal case insensitive value
//this is precautionarily added for non latinate languages where it could be an issue
public bool SearchCaseSensitiveOnly {get;set;}
public GlobalBizSettings()
{
Id=1;//always 1
SearchCaseSensitiveOnly = false;
}
}
}