Esempio n. 1
0
 public Entity.BaseResponse <Entity.DeviceType> Manage([FromBody] Entity.DeviceType request)
 {
     Entity.BaseResponse <Entity.DeviceType> response = new Entity.BaseResponse <Entity.DeviceType>(false);
     try
     {
         var status = _service.Manage(request);
         if (status.Success)
         {
             response.IsSuccess = status.Success;
             response.Message   = status.Message;
             response.Data      = status.Data;
         }
         else
         {
             response.IsSuccess = status.Success;
             response.Message   = status.Message;
         }
     }
     catch (Exception ex)
     {
         base.LogException(ex);
         return(new Entity.BaseResponse <Entity.DeviceType>(false, ex.Message));
     }
     return(response);
 }