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)); } }
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()); }