Beispiel #1
0
 /// <summary>
 /// Gets the projects.
 /// </summary>
 /// <param name="username">The username.</param>
 /// <returns>IEnumerable{Project}.</returns>
 public IEnumerable <Project> GetProjects(string username)
 {
     // Get the list of clients from the database
     return
         (_db.GetProjects()
          .Where(p => p.Client.User.UserName.Equals(username, StringComparison.CurrentCultureIgnoreCase))
          .OrderBy(p => p.Client.ClientName)
          .ThenBy(p => p.ProjectName));
 }
Beispiel #2
0
 /// <summary>
 /// Gets all of the projects the given user can access.
 /// </summary>
 /// <param name="username">The username.</param>
 /// <returns>IEnumerable{Project}.</returns>
 public IEnumerable <Project> GetProjects(string username)
 {
     return
         (_db.GetProjects()
          .Where(pr => pr.Client.User.UserName.Equals(username, StringComparison.CurrentCultureIgnoreCase)));
 }