public static ProjectModel FindOrCreate(string name, UserModel creator, RepoModel repository) { var project = ProjectModel.FindBy("repository_id", repository.id) ?? ProjectModel.Find(ProjectModel.Create(name, creator, repository)); ProjectSetUp.Run(project, creator); return(project); }
public static ProjectModel FindBy(string col, int val) => ProjectModel.FindBy(col, val);