public async Task <bool> Delete(RemoveRoleCmd cmd) { var evt = RoleRemovedEvt.MakeEventEntity(cmd); var insertions = await eventRepository.Create(evt); return(insertions > 0); }
public async Task <IActionResult> RemoveRole(long company, long user, long role) { var cmd = new RemoveRoleCmd(company, HttpContext.UserId().Value, role, user); var ok = await permissionRepository.Delete(cmd); if (ok) { return(Ok()); } return(BadRequest()); }