public void DeleteBuilder(string builderId)
        {
            var queries = new List <string>(3);

            try {
                // 1. Delete query from BuilderToProject
                var linkDaoImpl   = new BuilderProjectLinkDAOImpl();
                var queryFromLink = linkDaoImpl.GetDeleteBuilderQuery(builderId);
                queries.Add(queryFromLink);

                // 2. Delete query from ProjectDetails
                var projectDaoImpl   = new ProjectDAOImpl();
                var queryFromProject = projectDaoImpl.GetDeleteBuilderQuery(builderId);
                queries.Add(queryFromProject);

                // 3. Delete from BuilderDetails
                var query = GetDeleteBuilderQueryForDb(builderId);
                queries.Add(query);

                var daoHandler = new DAOServiceHandler();
                daoHandler.ExecuteQueryForDb(queries);
            }
            catch (Exception e) {
                throw new Exception("Exception occurred while deleting builder from database.", e);
            }
        }
 public IEnumerable <Project> GetBuilderProjects(string userName)
 {
     try {
         var query      = GetBuilderProjectQuery(userName);
         var daohandler = new DAOServiceHandler();
         var ds         = daohandler.ExecuteQueryForDb(query);
         return(ProjectDAOImpl.GetProjects(ds));
     }
     catch (Exception e) {
         throw new Exception("Exception occurred while getting projects information for the builder.", e);
     }
 }