public Int32 get_total_orders(Int32 companyId) { Int32 _count = 0; ViewOrderCollection _order = new ViewOrderCollection(); Where _wh = new Where(); _wh.ColumnName = "CompanyId"; _wh.ParameterValue = companyId; _wh.DbType = DbType.Int32; _order.Where(_wh); _count = _order.Count; return _count; }