public ResponseSerializer Put(int id, [FromBody] GatewaySerializer gatewaySerializer) { return(new ResponseSerializer( 200, "success", this._gatewayBus.UpdateGateway(id, gatewaySerializer))); }
public GatewaySerializer GetGatewayById(int id) { GatewayModel gateway = this._gatewayDao.GetById(id); GatewaySerializer result = new GatewaySerializer(gateway); return(result); }
public ResponseSerializer Post([FromBody] GatewaySerializer gatewaySerializer) { return(new ResponseSerializer( 200, "success", this._gatewayBus.CreateNewGateway(gatewaySerializer))); }
public String CreateNewGateway(GatewaySerializer gatewaySerializer) { GatewayModel gatewayModel = new GatewayModel(); gatewayModel.HardwareGatewayId = gatewaySerializer.hardwareGatewayID; gatewayModel.GatewayName = gatewaySerializer.gatewayName; gatewayModel.City = gatewaySerializer.city; gatewayModel.Factory = gatewaySerializer.factory; gatewayModel.Workshop = gatewaySerializer.workshop; gatewayModel.GatewayType = gatewaySerializer.gatewayType; gatewayModel.GatewayState = gatewaySerializer.gatewayState; gatewayModel.ImageUrl = gatewaySerializer.imageUrl; gatewayModel.Remark = gatewaySerializer.remark; return(this._gatewayDao.Create(gatewayModel)); }