public IEnumerable <ProjectResponseDto> GetProjectById(CreateProjectDto project) { return(_storage.GetProjects(new ProjectQuerySearch { Id = project.Id }).ToList()); }
public IEnumerable <ProjectResponseDto> GetProject(CreateProjectDto project) { return(_storage.GetProjects(new ProjectQuerySearch { Customer = project.Customer, Name = project.Name }).ToList()); }
public ProjectResponseDto CreateProject(CreateProjectDto project) { if (!GetProject(project).Any()) { _storage.CreateProject(project); } return(GetProject(project).SingleOrDefault()); }
public ProjectResponseDto UpdateProject(CreateProjectDto project) { _storage.UpdateProject(project); return(GetProjectById(project).SingleOrDefault()); }