public IHttpActionResult GetPolSourceObservationIssueWithID([FromUri] int PolSourceObservationIssueID, [FromUri] string lang = "en", [FromUri] string extra = "")
        {
            using (CSSPDBContext db = new CSSPDBContext(DatabaseType))
            {
                PolSourceObservationIssueService polSourceObservationIssueService = new PolSourceObservationIssueService(new Query()
                {
                    Language = (lang == "fr" ? LanguageEnum.fr : LanguageEnum.en)
                }, db, ContactID);

                polSourceObservationIssueService.Query = polSourceObservationIssueService.FillQuery(typeof(PolSourceObservationIssue), lang, 0, 1, "", "", extra);

                if (polSourceObservationIssueService.Query.Extra == "A")
                {
                    PolSourceObservationIssueExtraA polSourceObservationIssueExtraA = new PolSourceObservationIssueExtraA();
                    polSourceObservationIssueExtraA = polSourceObservationIssueService.GetPolSourceObservationIssueExtraAWithPolSourceObservationIssueID(PolSourceObservationIssueID);

                    if (polSourceObservationIssueExtraA == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(polSourceObservationIssueExtraA));
                }
                else if (polSourceObservationIssueService.Query.Extra == "B")
                {
                    PolSourceObservationIssueExtraB polSourceObservationIssueExtraB = new PolSourceObservationIssueExtraB();
                    polSourceObservationIssueExtraB = polSourceObservationIssueService.GetPolSourceObservationIssueExtraBWithPolSourceObservationIssueID(PolSourceObservationIssueID);

                    if (polSourceObservationIssueExtraB == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(polSourceObservationIssueExtraB));
                }
                else
                {
                    PolSourceObservationIssue polSourceObservationIssue = new PolSourceObservationIssue();
                    polSourceObservationIssue = polSourceObservationIssueService.GetPolSourceObservationIssueWithPolSourceObservationIssueID(PolSourceObservationIssueID);

                    if (polSourceObservationIssue == null)
                    {
                        return(NotFound());
                    }

                    return(Ok(polSourceObservationIssue));
                }
            }
        }
 public PolSourceObservationIssueTest()
 {
     polSourceObservationIssue       = new PolSourceObservationIssue();
     polSourceObservationIssueExtraA = new PolSourceObservationIssueExtraA();
     polSourceObservationIssueExtraB = new PolSourceObservationIssueExtraB();
 }