/// <summary> /// Handles Count Request /// </summary> /// <param name="db"></param> /// <param name="arg"></param> /// <returns></returns> protected dynamic HandleCountRequest(NancyBlackDatabase db, dynamic arg) { var entityName = (string)arg.table_name; var rows = db.Count(entityName, this.Request.Query["$filter"], this.Request.Query["$orderby"], this.Request.Query["$skip"], this.Request.Query["$top"]); return(JToken.Parse(rows.ToString())); }
protected dynamic HandleCountWithoutSkipAndTakeRequest(NancyBlackDatabase db, dynamic arg) { // Count without Skip and Take var entityName = (string)arg.table_name; var rows = db.Count(entityName, this.Request.Query["$filter"], this.Request.Query["$orderby"], null, null); return(JToken.Parse(rows.ToString())); }