public async Task <int> GetInfosTotal(Guid studentId) { var data = await _service.QueryAll(new Dictionary <string, string> { { "StudentId", studentId.ToString() }, { "IsRemove", false.ToString() } }); var borrows = data.ToList(); if (borrows.Count <= 0) { return(-1); } return(borrows.Count); }