public void AddDeviceAction(ApiDeviceActionResponseModel item) { if (!this.DeviceActions.Any(x => x.Id == item.Id)) { this.DeviceActions.Add(item); } }
public virtual ApiDeviceActionRequestModel MapResponseToRequest( ApiDeviceActionResponseModel response) { var request = new ApiDeviceActionRequestModel(); request.SetProperties( response.DeviceId, response.Name, response.@Value); return(request); }
public virtual ApiDeviceActionResponseModel MapRequestToResponse( int id, ApiDeviceActionRequestModel request) { var response = new ApiDeviceActionResponseModel(); response.SetProperties(id, request.DeviceId, request.Name, request.@Value); return(response); }