public FormRepository(string schemaName, string tableName, string database, long loginId, int userId)
{
var me = AppUsers.GetCurrentAsync().Result;
this._ObjectNamespace = Sanitizer.SanitizeIdentifierName(schemaName);
this._ObjectName = Sanitizer.SanitizeIdentifierName(tableName.Replace("-", "_"));
this.LoginId = me.LoginId;
this.OfficeId = me.OfficeId;
this.UserId = me.UserId;
this.Database = database;
this.LoginId = loginId;
this.UserId = userId;
if (!string.IsNullOrWhiteSpace(this._ObjectNamespace) &&
!string.IsNullOrWhiteSpace(this._ObjectName))
{
this.FullyQualifiedObjectName = this._ObjectNamespace + "." + this._ObjectName;
this.PrimaryKey = this.GetCandidateKey();
this.LookupField = this.GetLookupField();
this.NameColumn = this.GetNameColumn();
this.IsValid = true;
}
}