Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
T

thewizardoftn

@thewizardoftn
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Using Postman to test HTTPPatch in .Net Core API, [FromBody] JsonPatchDocument<TEntity> patchEntity is null
    T thewizardoftn

    [HttpPatch("{id:int}")]
    public async TaskUpdatePartialAsync(int id, [FromBody] JsonPatchDocument patchEntity)
    {
    var entity = await _service.ReadAsync(id, false);
    if (entity == null)
    return NotFound();
    try
    {
    patchEntity.ApplyTo(entity, ModelState);
    }
    catch(Exception ex)
    {

                return Ok(ex.Message);
            }
            entity = await \_service.UpdateAsync(id, entity);
    
            return Ok(entity);
        }
    

    When accessing this in PostMan, the return is an error, patchEntity has one Operation with all values being null. Any ideas?

    .NET (Core and Framework) csharp asp-net dotnet json help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups