Ejemplo n.º 1
0
 public void Create(RamMetrics item)
 {
     using (var connection = new SQLiteConnection(SqlConnect.connectionString))
     {
         connection.Execute("INSERT INTO rammetrics(value, time) VALUES(@value, @time)",
                            new
         {
             value = item.Value,
             time  = item.Time.ToUnixTimeSeconds()
         });
     }
 }
Ejemplo n.º 2
0
 public void Create(RamMetrics item)
 {
     using (var connection = new SQLiteConnection(SQLConnected.ConnectionString))
     {
         connection.Execute(@"INSERT INTO rammetrics(value, time, agentid ) VALUES(@value, @time, @agentid )",
                            new
         {
             agentid = item.AgentId,
             value   = item.Value,
             time    = item.Time.ToUnixTimeSeconds()
         });
     }
 }