public Notification Post(Notification notification) { try { _context.Notifications.Add(notification); _context.SaveChanges(); return(notification); } catch (Exception e) { throw e; } }
public Configuration Put(Configuration config) { try { _context.Configurations.Update(config); _context.SaveChanges(); return(config); } catch (Exception ex) { throw ex; } }
public PlantDataSet Put(PlantDataSet dataSet) { try { _context.DataSets.Update(dataSet); _context.SaveChanges(); return(dataSet); } catch (Exception ex) { throw ex; } }
public Sensor Put(Sensor sensor) { try { _context.Sensors.Update(sensor); _context.SaveChanges(); return(sensor); } catch (Exception ex) { throw ex; } }
public SensorType Put(SensorType type) { try { _context.SensorTypes.Update(type); _context.SaveChanges(); return(type); } catch (Exception ex) { throw ex; } }
public LabFarm Put(LabFarm labfarm) { try { _context.LabFarms.Update(labfarm); _context.SaveChanges(); return(labfarm); } catch (Exception ex) { throw ex; } }
public Picture Put(Picture picture) { try { _context.Pictures.Update(picture); _context.SaveChanges(); return(picture); } catch (Exception ex) { throw ex; } }
public SensorData Put(SensorData value) { try { _context.SensorValues.Update(value); _context.SaveChanges(); return(value); } catch (Exception ex) { throw ex; } }
public Plant Put(Plant plant) { try { _context.Plants.Update(plant); _context.SaveChanges(); return(plant); } catch (Exception ex) { throw ex; } }