Ejemplo n.º 1
0
        public async Task <string> CreateProject(ProjectDto projectDto)
        {
            var project = new Projects
            {
                Active         = true,
                Budget         = projectDto.Budget,
                Comments       = projectDto.Comments,
                CreatedBy      = Guid.NewGuid(), // TODO
                CreatedOn      = _dateTimeHelper.GetCurrentDate(),
                EndDate        = projectDto.DueDate,
                OrgId          = Guid.NewGuid(), // TODO
                Id             = 1,              // TODO : Guid
                ProjectManager = Guid.NewGuid(), // TODO: Project manager
                StartDate      = projectDto.StartDate,
                Title          = projectDto.Name,
                UniqueId       = Guid.NewGuid()
            };

            return(await _projectRepository.CreateProject(project));
        }