public ResultDTO Post([FromBody] RoleEntity roleEntity) { try { return(_roleServices.CreateRole(roleEntity)); } catch (Exception ex) { throw new ApiDataException(1000, "Role Not Found", HttpStatusCode.NotFound); } }
public IHttpActionResult Create([FromBody] InputCreateRole input) { var result = _roleServices.CreateRole(input); return(Ok(result)); }
public async Task <IActionResult> PostRole(Role role) { return(Ok(await roleServices.CreateRole(role))); }