public static Project IncludeConnections(this Project project, IConnectionRepository connectionRepository) { if (project.Connections != null) { return(project); } project.Connections = (ConnectionList)connectionRepository.GetDataByProjectId(project.ProjectId); return(project); }
public IQueryable <Connection> GetDataByProjectId(int projectId) { return(_dbRepository.GetDataByProjectId(projectId).AsQueryable()); }
public static Project IncludeConnections(this Project project, IConnectionRepository connectionRepository) { if (project.Connections != null) return project; project.Connections = (ConnectionList) connectionRepository.GetDataByProjectId(project.ProjectId); return project; }