Exemple #1
0
        public async Task <int> CreateProjectAsync(string name, int?categoryId, int profileId)
        {
            Validate.NotNull(name, "Project name");

            var p = new Entities.Project
            {
                Name       = name,
                CategoryId = categoryId,
                UserId     = profileId
            };
            await uow.ProjectRepository.CreateAsync(p);

            return(p.Id);
        }
Exemple #2
0
        public async Task <IEnumerable <SectionCard> > GetProjectSectionsAsync(int projectId)
        {
            Entities.Project project = await FindEntityAsync(uow.ProjectRepository, x => x.Id == projectId);

            return(ConvertToSectionCards(project.Sections));
        }