IQueryCollectionExtensions Class

Extends Query Collections to make it easier to retrieve collection values either individually or multi-values.

Based on concepts from Khalid Abuhakmeh: https://khalidabuhakmeh.com/read-and-convert-querycollection-values-in-aspnet

System.Object
   Westwind.AspNetCore.Extensions.IQueryCollectionExtensions

Class Members

MemberDescription
Get Retrieves a single value and casts it toa non-string value. For string use the non-Generic version
public static string Get(IQueryCollection collection, string key, string defaultValue)
public static T Get(IQueryCollection collection, string key, T defaultValue)
GetAll Retrieves multiple selection values for a keyand returns them as strings.
public static IEnumerable GetAll(IQueryCollection collection, string key, string defaultValue)
public static IEnumerable GetAll(IQueryCollection collection, string key, T defaultValue)
Namespace: Westwind.AspNetCore.Extensions

Assembly: Westwind.AspNetCore.dll



© West Wind Technologies, 2025 • Updated: 2025-03-08
Comment or report problem with topic