public ActionResult <Result <RoleSystemAction> > Post([FromBody] RoleSystemAction model) { try { _roleSystemActionService.Add(model); _logger.LogInformation("Added one RoleSystemAction"); return(new Result <RoleSystemAction>(true, "RoleSystemAction added successfully")); } catch (Exception ex) { _logger.LogError(ex, "Error occurred on RoleSystemAction adding"); throw ex; } }
public ActionResult <Result <RoleSystemAction> > Patch(long id, [FromBody] RoleSystemAction model) { try { _roleSystemActionService.Update(model, id); _logger.LogInformation("Updated one RoleSystemAction"); return(new Result <RoleSystemAction>(true, "RoleSystemAction updated successfully")); } catch (Exception ex) { _logger.LogError(ex, "Error occurred on RoleSystemAction updating"); throw ex; } }
public ActionResult <Result <RoleSystemAction> > Get(long id) { try { RoleSystemAction roleSystemAction = _roleSystemActionService.GetById(id); _logger.LogInformation("Get one RoleSystemAction"); return(new Result <RoleSystemAction>(true, "", roleSystemAction)); } catch (Exception ex) { _logger.LogError(ex, "Error occurred on RoleSystemAction getting"); throw ex; } }