コード例 #1
0
 public IEnumerable <ProjectResponseDto> GetProjectById(CreateProjectDto project)
 {
     return(_storage.GetProjects(new ProjectQuerySearch
     {
         Id = project.Id
     }).ToList());
 }
コード例 #2
0
 public IEnumerable <ProjectResponseDto> GetProject(CreateProjectDto project)
 {
     return(_storage.GetProjects(new ProjectQuerySearch
     {
         Customer = project.Customer,
         Name = project.Name
     }).ToList());
 }
コード例 #3
0
        public ProjectResponseDto CreateProject(CreateProjectDto project)
        {
            if (!GetProject(project).Any())
            {
                _storage.CreateProject(project);
            }

            return(GetProject(project).SingleOrDefault());
        }
コード例 #4
0
        public ProjectResponseDto UpdateProject(CreateProjectDto project)
        {
            _storage.UpdateProject(project);

            return(GetProjectById(project).SingleOrDefault());
        }