Inheritance: CommentDTO, IEntity
コード例 #1
0
ファイル: Comment.cs プロジェクト: TargetProcess/Tp.HelpDesk
		public static Comment RetrieveOrCreate(int? id)
		{
			var comment = new Comment {OwnerID = Requester.Logged.ID};

			comment = (DataPortal.Instance.Retrieve(typeof (Comment), id) as Comment) ?? comment;

			return comment;
		}
コード例 #2
0
ファイル: Comment.cs プロジェクト: TargetProcess/Tp.HelpDesk
		public static bool TryRetrieve(int? id, out Comment comment)
		{
			try
			{
				comment = (DataPortal.Instance.Retrieve(typeof(Comment), id) as Comment);
				return comment != null;
			}
			catch (Exception)
			{
				comment = null;
				return false;
			}
		}