public IEnumerable <Project> GetUserProjects() { if (user == null) { return(new Project[0]); } return(db.SelectObjects <Project> ("SELECT * FROM Project, UserProject WHERE Project.Id = UserProject.ProjectId AND UserProject.UserId = {0} AND UserProject.Permissions & {1} != 0 AND Project.ApplicationId={2}", user.Id, (int)ProjectPermission.Administer, application.Id)); }
public IEnumerable <Application> GetApplications() { return(db.SelectObjects <Application> ()); }