public bool Save(ISqlOperation sqlOperation)
        {
            var rowAdded = sqlOperation.Execute(ExecuteSqlQuery.InsertRow_HubData, RequestId, HubName,
                                                MethodName, Arguments, ReturnData, ExceptionData);

            return(rowAdded == 1);
        }
        public async Task <bool> SaveAsync(ISqlOperation sqlOperation)
        {
            var rowAdded = await sqlOperation.ExecuteAsync(ExecuteSqlQuery.InsertRow_HubData, RequestId, HubName,
                                                           MethodName, Arguments, ReturnData, ExceptionData);

            return(rowAdded == 1);
        }
Exemple #3
0
        public async Task <bool> SaveAsync(ISqlOperation sqlOperation)
        {
            var rowAdded = await sqlOperation.ExecuteAsync(ExecuteSqlQuery.InsertRow_SessionReport, SessionId, IsStarted,
                                                           IsConnected, TotalRequestCount, FailedRequestCount, HubNames, TotalConnectionTime, NegotiationData);

            return(rowAdded == 1);
        }
        public async Task <bool> SaveAsync(ISqlOperation sqlOperation)
        {
            var rowAdded = await sqlOperation.ExecuteAsync(ExecuteSqlQuery.InsertRow_Session, ConnectionId, ConnectionToken,
                                                           IsCompleted, StartTimeStamp, FinishTimeStamp, NegotiateData);

            return(rowAdded == 1);
        }
        public bool Save(ISqlOperation sqlOperation)
        {
            var rowAdded = sqlOperation.Execute(ExecuteSqlQuery.InsertRow_Session, ConnectionId, ConnectionToken,
                                                IsCompleted, StartTimeStamp, FinishTimeStamp, NegotiateData);

            return(rowAdded == 1);
        }
        public async Task <bool> SaveAsync(ISqlOperation sqlOperation)
        {
            var rowAdded = await sqlOperation.ExecuteAsync(ExecuteSqlQuery.InsertRow_Request, SessionId, RequestUrl,
                                                           RemoteIp, RemotePort, ServerIp, ServerPort, RequestContentType, RequestBody, Protocol, QueryString, User,
                                                           RequestTimeStamp, ResponseTimeStamp, RequestLatency, StatusCode, ResponseBody, IsWebSocketRequest, RequestType);

            return(rowAdded == 1);
        }
Exemple #7
0
        public static TEntity GetSingle <TEntity>(this TEntity entity, int primaryId) where TEntity : IDataTableObject
        {
            var enumName = $"GetSingle_{entity.TableName}";

            if (Enum.TryParse <SelectSqlQuery>(enumName, out var queryEnum))
            {
                ISqlOperation dep = DashboardGlobal.ServiceResolver.GetService <ISqlOperation>();

                return(dep.Select <TEntity>(queryEnum, primaryId));
            }

            throw new NotImplementedException($"No SelectSqlQuery enum found for table name: {entity.TableName} , enum name: {enumName} .");
        }
 public Task <bool> SaveAsync(ISqlOperation sqlOperation)
 {
     throw new NotImplementedException();
 }
 public bool Save(ISqlOperation sqlOperation)
 {
     throw new NotImplementedException();
 }
 // TODO : make DI more generic
 public DefaultDataTracing(ISqlOperation sqlOperation)
 {
     _sqlOperation = sqlOperation;
 }
 public async Task ExecuteAsync(ISqlOperation <TEntity> operation)
 {
     await DbConnection.ExecuteAsync(
         operation.Sql,
         operation.Parameters);
 }