public IActionResult DeleteClaim(Guid key, [FromBody] Model.ClaimModel model) { var entity = _mapper.Map <PimsClaim>(model); _pimsService.Claim.Delete(entity); return(new JsonResult(model)); }
public IActionResult DeleteClaim(Guid id, [FromBody] Model.ClaimModel model) { var entity = _mapper.Map <Claim>(model); _pimsAdminService.Claim.Remove(entity); return(new JsonResult(model)); }
public IActionResult AddClaim([FromBody] Model.ClaimModel model) { var entity = _mapper.Map <Entity.PimsClaim>(model); // TODO: Return bad request. _pimsService.Claim.Add(entity); var claim = _mapper.Map <Model.ClaimModel>(entity); return(CreatedAtAction(nameof(GetClaim), new { id = claim.Id }, claim)); }
public IActionResult UpdateClaim(Guid key, [FromBody] Model.ClaimModel model) { var entity = _mapper.Map <PimsClaim>(model); _pimsService.Claim.Update(entity); var claim = _mapper.Map <Model.ClaimModel>(entity); return(new JsonResult(claim)); }