Ejemplo n.º 1
0
 public Task<int> InsertDevice(CreateDeviceInput input)
 {
     Mapper.CreateMap<CreateDeviceInput, Device>();
     int result = _deviceTable.Insert(Mapper.Map<Device>(input));
     if (result > 0)
         _requestDeviceTable.UpdateRequestDeviceStatus(input.ClientId, input.DeviceKey, true);
     return Task.FromResult(result);
 }
Ejemplo n.º 2
0
 public async Task<ResultUpdateOutput> CreateDevice(CreateDeviceInput input)
 {
     var result = new ResultUpdateOutput
                  {
         Status = 1
     };
     try
     {
         if (string.IsNullOrEmpty(input.ClientId))
             input.ClientId = "MSoatVe";
         int test = await _deviceBll.InsertDevice(input);
         if (test > 0)
             result.Status = 0;
     }
     catch (Exception ex)
     {
         ErrorStore.LogExceptionWithoutContext(ex);
     }
  
    
     return result;
 }