Example #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());
        }
Example #2
0
 public void Remove(SmartmeterPacket smartmeterPacketIn) =>
 _smartmeterPackets.DeleteOne(smartmeterPacket => smartmeterPacket.Id == smartmeterPacketIn.Id);
Example #3
0
 public void Update(string id, SmartmeterPacket smartmeterPacketIn) =>
 _smartmeterPackets.ReplaceOne(smartmeterPacket => smartmeterPacket.Id == id, smartmeterPacketIn);
Example #4
0
 public SmartmeterPacket Create(SmartmeterPacket smartmeterPacket)
 {
     _smartmeterPackets.InsertOne(smartmeterPacket);
     return(smartmeterPacket);
 }
Example #5
0
        public ActionResult <SmartmeterPacket> Create(SmartmeterPacket SmartmeterPacket)
        {
            _SmartmeterPacketService.Create(SmartmeterPacket);

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