Esempio n. 1
0
 public IActionResult Post([FromBody] PropertyUserField propertyUserField)
 {
     using (var scope = new TransactionScope())
     {
         _Repo.Insert(propertyUserField);
         scope.Complete();
         return(CreatedAtAction(nameof(Get), new { id = propertyUserField.Id }, propertyUserField));
     }
 }
Esempio n. 2
0
 public IActionResult Put([FromBody] PropertyUserField propertyUserField)
 {
     if (propertyUserField != null)
     {
         using (var scope = new TransactionScope())
         {
             _Repo.Update(propertyUserField);
             scope.Complete();
             return(new OkResult());
         }
     }
     return(new NoContentResult());
 }