Exemplo n.º 1
0
        public long CreateProject(ProjectContract projectData)
        {
            var currentUserId = m_userManager.GetCurrentUserId();
            var work          = new CreateProjectWork(m_projectRepository, projectData, currentUserId);

            var resultId = work.Execute();

            return(resultId);
        }
Exemplo n.º 2
0
        public long CreateProject(CreateProjectContract projectData)
        {
            var currentUserId = m_authenticationManager.GetCurrentUserId();
            var work          = new CreateProjectWork(m_projectRepository, projectData, currentUserId, m_defaultUserProvider, m_mapper);
            var resultId      = work.Execute();

            if (projectData.ProjectType == ProjectTypeContract.Community && projectData.BookTypesForForum != null)
            {
                m_forumSiteManager.CreateOrUpdateForums(resultId, projectData.BookTypesForForum.Select(x => (short)x).ToArray());
            }

            return(resultId);
        }