public static async Task <IResult> ForBean(int beanid, IMovementService movementService) { if (beanid <= 0) { return(Results.BadRequest(new ApiError(string.Format(Strings.Invalid, "movement id")))); } var movements = await movementService.GetForBeanAsync(beanid); return(Results.Ok(movements)); }