예제 #1
0
 public Project Create(Project project)
 {
     try
     {
         ProjectRepo projectRepository = new ProjectRepo();
         if (projectRepository.DoesProjectExist(project.ProjectName))
         {
             throw new ValidationServiceException("Project with this name = " + project.ProjectName + ", already exist in database.");
         }
         projectRepository.Create(project);
         return(project);
     }
     catch (ValidationServiceException)
     {
         throw;
     }
     catch (RepositoryException)
     {
         throw;
     }
     catch (Exception ex)
     {
         throw new ServiceException("User with this Username = "******", already exists in database.", ex);
     }
 }