public void GetIntellectualProperties(RestAPIGetIntellectualResponse response, int IntellectualId) { List <RESTAPIIntellectualInterchange> intellectualInterchangeList = null; DatabaseWrapper.databaseOperation(response, (context, query) => { intellectualInterchangeList = new List <RESTAPIIntellectualInterchange>(); IdeaIntellectualProperty ideaIntellectualProperty = query.GetIdeaIntellectualById(context, IntellectualId); if (ideaIntellectualProperty != null) { RESTAPIIntellectualInterchange intellectualInterchange = new RESTAPIIntellectualInterchange(ideaIntellectualProperty); intellectualInterchangeList.Add(intellectualInterchange); } response.Status = Success; } , readOnly: true ); if (intellectualInterchangeList != null && intellectualInterchangeList.Count > 0) { response.IdeaIntellectList.AddRange(intellectualInterchangeList); } }
public RestAPIGetIntellectualResponse GetIntellectualProperty([FromUri] int IntellectualId) { RestAPIGetIntellectualResponse response = new RestAPIGetIntellectualResponse(); submitIdeaUtil.GetIntellectualProperties(response, IntellectualId); return(response); }