public BaseController(IHttpContextAccessor httpContext, ITenantDbFactory dbFactory) { Tenant = httpContext.HttpContext.GetTenant(); if (Tenant != null) { Context = dbFactory.GetTenantDatabase(Tenant.DbName); } }
public virtual void Persist(string TenantAccountId, ITenantDbFactory dbconf, bool IsNew) { if (IsNew) { string sql = "INSERT INTO eb_connections (con_type, solution_id, nick_name, con_obj) VALUES (@con_type, @solution_id, @nick_name, @con_obj) RETURNING id"; DbParameter[] parameters = { dbconf.DataDB.GetNewParameter("con_type", System.Data.DbType.String, EbConnectionType), dbconf.DataDB.GetNewParameter("solution_id", System.Data.DbType.String, TenantAccountId), dbconf.DataDB.GetNewParameter("nick_name", System.Data.DbType.String, !(string.IsNullOrEmpty(NickName))?NickName:string.Empty), dbconf.DataDB.GetNewParameter("con_obj", NpgsqlTypes.NpgsqlDbType.Json, EbSerializers.Json_Serialize(this)) }; var iCount = dbconf.DataDB.DoQuery(sql, parameters); } else if (!IsNew) { string sql = @"UPDATE eb_connections SET eb_del = true WHERE con_type = @con_type AND solution_id = @solution_id; INSERT INTO eb_connections (con_type, solution_id, nick_name, con_obj) VALUES (@con_type, @solution_id, @nick_name, @con_obj)"; DbParameter[] parameters = { dbconf.DataDB.GetNewParameter("con_type", System.Data.DbType.String, EbConnectionType), dbconf.DataDB.GetNewParameter("solution_id", System.Data.DbType.String, TenantAccountId), dbconf.DataDB.GetNewParameter("nick_name", System.Data.DbType.String, !(string.IsNullOrEmpty(NickName))?NickName:string.Empty), dbconf.DataDB.GetNewParameter("con_obj", NpgsqlTypes.NpgsqlDbType.Json, EbSerializers.Json_Serialize(this)) }; var iCount = dbconf.DataDB.DoNonQuery(sql, parameters); } }
public EbBaseService(ITenantDbFactory _dbf) { this.TenantDbFactory = _dbf as TenantDbFactory; }
public MenuServices(ITenantDbFactory _dbf) : base(_dbf) { }
public MultiLanguageService(ITenantDbFactory _dbf) : base(_dbf) { }
public TenantRepository(ITenantDbFactory tenantDbFactory) { TenantDbFactory = tenantDbFactory; }
public TenantController(IHttpContextAccessor httpContext, ITenantDbFactory dbFactory) : base(httpContext, dbFactory) { }
public DataVisService(ITenantDbFactory _dbf) : base(_dbf) { }
public DevRelatedServices(ITenantDbFactory _dbf) : base(_dbf) { }
public UnitOfWork(IUserDbFactory userDbFactory, ITenantDbFactory tenantDbFactory) { _userDbFactory = userDbFactory; _tenantDbFactory = tenantDbFactory; }
public DataSourceService(ITenantDbFactory _dbf) : base(_dbf) { }
public ChatbotServices(ITenantDbFactory _dbf) : base(_dbf) { }
public EbObjectService(ITenantDbFactory _dbf) : base(_dbf) { }
public FileService(ITenantDbFactory _tdb, IMessageProducer _mqp, IMessageQueueClient _mqc) : base(_tdb, _mqp, _mqc) { }
public EbBaseService(ITenantDbFactory _dbf, IMessageProducer _mqp) { this.TenantDbFactory = _dbf as TenantDbFactory; this.MessageProducer3 = _mqp as RabbitMqProducer; }
public EbBaseService(ITenantDbFactory _dbf, IMessageProducer _mqp, IMessageQueueClient _mqc) { this.TenantDbFactory = _dbf as TenantDbFactory; this.MessageProducer3 = _mqp as RabbitMqProducer; this.MessageQueueClient = _mqc as RabbitMqQueueClient; }
public ConnectionManager(ITenantDbFactory _dbf, IMessageProducer _mqp, IMessageQueueClient _mqc) : base(_dbf, _mqp, _mqc) { }
public TenantUserServices(ITenantDbFactory _dbf) : base(_dbf) { }
public GoogleMapServices(ITenantDbFactory _dbf) : base(_dbf) { }