예제 #1
0
 public IActionResult UpdateTable(string id, TableUpdateDto table)
 {
     try
     {
         Table t = _mapper.Map <Table>(table);
         t.Id = id;
         //TODO: asign role, Email, Password, AccountType from client or do partial update with Attach
         if (_tablesService.UpdateTable(t))
         {
             return(Ok());
         }
         return(NotFound("Table with id not found"));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }