Inheritance: CommentDTO, IEntity
Ejemplo n.º 1
0
		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;
		}
Ejemplo n.º 2
0
		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;
			}
		}