コード例 #1
0
ファイル: MyContext.cs プロジェクト: Tennyleaz/DailyReportApi
 public bool ProjectExist(int id)
 {
     if (ProjectItems == null)
     {
         return(false);
     }
     return(ProjectItems.Any(x => x.Id == id));
 }
コード例 #2
0
 /// <summary>
 /// Checks if the project contains the specified
 /// </summary>
 /// <param name="filename"></param>
 /// <returns></returns>
 public bool ContainsFile(string filename)
 {
     return(ProjectItems.Any(p => p.Filename == filename));
 }
コード例 #3
0
 /// <summary>
 /// Checks if the project contains the specified file
 /// </summary>
 /// <param name="filename">File name</param>
 /// <returns>True, if the project contains the specified file.</returns>
 public bool ContainsFile(string filename)
 => ProjectItems.Any(p => p.Filename == filename || p.HasChild(filename));