Skip to content

Commit 2f87f38

Browse files
committed
Merge pull request #504 from hishamco/dev
Using 'nameof' operator instead of magic strings
2 parents 820b267 + 44a58ff commit 2f87f38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/MvcMusicStore.Spa/Infrastructure/PagedList.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static IPagedList<T> ToPagedList<T>(this IQueryable<T> query, int page, i
4444
{
4545
if (query == null)
4646
{
47-
throw new ArgumentNullException("query");
47+
throw new ArgumentNullException(nameof(query));
4848
}
4949

5050
var pagingConfig = new PagingConfig(page, pageSize);
@@ -69,7 +69,7 @@ public static async Task<IPagedList<T>> ToPagedListAsync<T>(this IQueryable<T> q
6969
{
7070
if (query == null)
7171
{
72-
throw new ArgumentNullException("query");
72+
throw new ArgumentNullException(nameof(query));
7373
}
7474

7575
var pagingConfig = new PagingConfig(page, pageSize);

src/MvcMusicStore.Spa/Infrastructure/SortExpression.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static IQueryable<T> SortBy<T>(this IQueryable<T> source, string sortExpr
3737

3838
if (source == null)
3939
{
40-
throw new ArgumentNullException("source");
40+
throw new ArgumentNullException(nameof(source));
4141
}
4242

4343
if (String.IsNullOrWhiteSpace(sortExpression))

0 commit comments

Comments
 (0)