public IActionResult Update(string id, SmartmeterPacket SmartmeterPacketIn) { var SmartmeterPacket = _SmartmeterPacketService.Get(id); if (SmartmeterPacket == null) { return(NotFound()); } _SmartmeterPacketService.Update(id, SmartmeterPacketIn); return(NoContent()); }
public void Remove(SmartmeterPacket smartmeterPacketIn) => _smartmeterPackets.DeleteOne(smartmeterPacket => smartmeterPacket.Id == smartmeterPacketIn.Id);
public void Update(string id, SmartmeterPacket smartmeterPacketIn) => _smartmeterPackets.ReplaceOne(smartmeterPacket => smartmeterPacket.Id == id, smartmeterPacketIn);
public SmartmeterPacket Create(SmartmeterPacket smartmeterPacket) { _smartmeterPackets.InsertOne(smartmeterPacket); return(smartmeterPacket); }
public ActionResult <SmartmeterPacket> Create(SmartmeterPacket SmartmeterPacket) { _SmartmeterPacketService.Create(SmartmeterPacket); return(CreatedAtRoute("GetSmartmeterPacket", new { id = SmartmeterPacket.Id.ToString() }, SmartmeterPacket)); }