1
This commit is contained in:
16
Yes.Blog/Endpoints/Blogs/NameValueCollectionExtensions.cs
Normal file
16
Yes.Blog/Endpoints/Blogs/NameValueCollectionExtensions.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
namespace Yes.Blog.Endpoints.Blogs
|
||||
{
|
||||
public static class NameValueCollectionExtensions
|
||||
{
|
||||
public static NameValueCollection ToNameValueCollection(this IQueryCollection queryCollection)
|
||||
{
|
||||
NameValueCollection nameValueCollection = new NameValueCollection();
|
||||
foreach (var (key, value) in queryCollection)
|
||||
{
|
||||
nameValueCollection.Add(key.ToUpper(), value);
|
||||
}
|
||||
|
||||
return nameValueCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user