Example #1
0
        /// <summary>
        /// Returns column dbo.EmailTemplates.Value serialized to provided type
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="templateName"></param>
        /// <returns></returns>
        public async Task <T> Get <T>(string templateName)
        {
            var parameters = CreateDynamicTemplateNameParameter(templateName);

            var value = await _sqlDataAccess.ExecuteStoredProcedureAsync(StoredProcedures.SpEmailTemplatesGet,
                                                                         _dbConnectionString, parameters);

            return(JsonSerializer.Deserialize <T>(value.ToString()));
        }
Example #2
0
 public async Task <JsonElement> GetAll()
 {
     return(await _sqlDataAccess.ExecuteStoredProcedureAsync(StoredProcedures.SpBcParameterGetAll, _dbConnectionString, new { }));
 }
 public async Task CloseOldStreams(DateTime?dateTimeNowUtc, int?olderThanInMinutes)
 {
     await _sqlDataAccess.ExecuteStoredProcedureAsync(StoredProcedures.SpCloseOldStreams, _dbConnectionString,
                                                      new { dateTimeNowUtc, olderThanInMinutes });
 }
Example #4
0
 public async Task <JsonElement> GetAll(bool isActive)
 {
     return(await _sqlDataAccess.ExecuteStoredProcedureAsync(StoredProcedures.SpStreamGetAll, _dbConnectionString, new { isActive }));
 }
Example #5
0
 public async Task <JsonElement> GetAll(DateTime?fromDate, DateTime?toDate)
 {
     return(await _sqlDataAccess.ExecuteStoredProcedureAsync(StoredProcedures.SpOnlineEventGetAll, _dbConnectionString, new { fromDate, toDate }));
 }