Ejemplo n.º 1
0
        public IActionResult Update(string id, SmartmeterPacket SmartmeterPacketIn)
        {
            var SmartmeterPacket = _SmartmeterPacketService.Get(id);

            if (SmartmeterPacket == null)
            {
                return(NotFound());
            }

            _SmartmeterPacketService.Update(id, SmartmeterPacketIn);

            return(NoContent());
        }
Ejemplo n.º 2
0
 public void Remove(SmartmeterPacket smartmeterPacketIn) =>
 _smartmeterPackets.DeleteOne(smartmeterPacket => smartmeterPacket.Id == smartmeterPacketIn.Id);
Ejemplo n.º 3
0
 public void Update(string id, SmartmeterPacket smartmeterPacketIn) =>
 _smartmeterPackets.ReplaceOne(smartmeterPacket => smartmeterPacket.Id == id, smartmeterPacketIn);
Ejemplo n.º 4
0
 public SmartmeterPacket Create(SmartmeterPacket smartmeterPacket)
 {
     _smartmeterPackets.InsertOne(smartmeterPacket);
     return(smartmeterPacket);
 }
Ejemplo n.º 5
0
        public ActionResult <SmartmeterPacket> Create(SmartmeterPacket SmartmeterPacket)
        {
            _SmartmeterPacketService.Create(SmartmeterPacket);

            return(CreatedAtRoute("GetSmartmeterPacket", new { id = SmartmeterPacket.Id.ToString() }, SmartmeterPacket));
        }