Пример #1
0
 public void AddDeviceAction(ApiDeviceActionClientResponseModel item)
 {
     if (!this.DeviceActions.Any(x => x.Id == item.Id))
     {
         this.DeviceActions.Add(item);
     }
 }
        public virtual ApiDeviceActionClientRequestModel MapClientResponseToRequest(
            ApiDeviceActionClientResponseModel response)
        {
            var request = new ApiDeviceActionClientRequestModel();

            request.SetProperties(
                response.Action,
                response.DeviceId,
                response.Name);
            return(request);
        }
        public virtual ApiDeviceActionClientResponseModel MapClientRequestToResponse(
            int id,
            ApiDeviceActionClientRequestModel request)
        {
            var response = new ApiDeviceActionClientResponseModel();

            response.SetProperties(id,
                                   request.Action,
                                   request.DeviceId,
                                   request.Name);
            return(response);
        }