Using key word (#10172)

In [coding-style.md](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md ) NO 11, we use language keywords instead of BCL types
pull/10183/head
lindexi 2019-01-03 23:54:21 +08:00 committed by Scott Addie
parent 39c27edf7a
commit 3cbf9d7816
1 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ namespace RazorPagesMovie.Pages.Movies
var movies = from m in _context.Movie
select m;
#region snippet_SearchNull
if (!String.IsNullOrEmpty(SearchString))
if (!string.IsNullOrEmpty(SearchString))
{
movies = movies.Where(s => s.Title.Contains(SearchString));
}
@ -68,12 +68,12 @@ namespace RazorPagesMovie.Pages.Movies
var movies = from m in _context.Movie
select m;
if (!String.IsNullOrEmpty(SearchString))
if (!string.IsNullOrEmpty(SearchString))
{
movies = movies.Where(s => s.Title.Contains(SearchString));
}
if (!String.IsNullOrEmpty(MovieGenre))
if (!string.IsNullOrEmpty(MovieGenre))
{
movies = movies.Where(x => x.Genre == MovieGenre);
}