API should handle issues.
" + }, + new Issue(){ + IssueId = 2, + Title = "Handle Issues with API GET", + Project = "PRJ", + Text = "GET should handle issues.
", + ParentId = 1 + }, + new Issue(){ + IssueId = 3, + Title = "Handle Issues with API POST", + Project = "PRJ", + Text = "POST should handle issues.
", + ParentId = 1 + }, + new Issue(){ + IssueId = 4, + Title = "This is a Test Issue", + Project = "TEST", + Text = "This is a Test Issue
", + ParentId = 1 + }, + }; + + public IssueRepository() + { + + } + + public Issue[] GetIssues() + { + return issues; + } + + public Issue? GetIssueById(int Id) + { + Issue issue = issues.Where(p => p.IssueId == Id).First(); + return issue; + } + + public Issue[]? GetIssuesByProject(string Project) + { + Issue[] FoundIssues = issues.Where(p => p.Project.ToLower() == Project.ToLower()).ToArray(); + return FoundIssues; + } +} \ No newline at end of file diff --git a/web/Backend/Services/ITestService.cs b/web/Backend/Services/ITestService.cs new file mode 100644 index 0000000..2ffe7da --- /dev/null +++ b/web/Backend/Services/ITestService.cs @@ -0,0 +1,6 @@ +using Backend.Services; + +public interface ITestService +{ + void Test(); +} \ No newline at end of file diff --git a/web/Backend/Services/TestService.cs b/web/Backend/Services/TestService.cs new file mode 100644 index 0000000..4d4fd4f --- /dev/null +++ b/web/Backend/Services/TestService.cs @@ -0,0 +1,14 @@ +namespace Backend.Services; + +public class TestService : ITestService +{ + public TestService() + { + + } + + public void Test() + { + + } +} \ No newline at end of file