Using 'nameof' operator instead of magic strings

This commit is contained in:
Hisham Abdullah Bin Ateya 2015-06-20 00:16:34 +03:00
parent 820b26744f
commit 44a58ff1b9
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ namespace MvcMusicStore.Infrastructure
{ {
if (query == null) if (query == null)
{ {
throw new ArgumentNullException("query"); throw new ArgumentNullException(nameof(query));
} }
var pagingConfig = new PagingConfig(page, pageSize); var pagingConfig = new PagingConfig(page, pageSize);
@ -69,7 +69,7 @@ namespace MvcMusicStore.Infrastructure
{ {
if (query == null) if (query == null)
{ {
throw new ArgumentNullException("query"); throw new ArgumentNullException(nameof(query));
} }
var pagingConfig = new PagingConfig(page, pageSize); var pagingConfig = new PagingConfig(page, pageSize);

View File

@ -37,7 +37,7 @@ namespace MvcMusicStore.Infrastructure
if (source == null) if (source == null)
{ {
throw new ArgumentNullException("source"); throw new ArgumentNullException(nameof(source));
} }
if (String.IsNullOrWhiteSpace(sortExpression)) if (String.IsNullOrWhiteSpace(sortExpression))