Blog.Logic.Core.PostContentsLogic.Delete C# (CSharp) Method

Delete() public method

public Delete ( int postContentId ) : bool
postContentId int
return bool
        public bool Delete(int postContentId)
        {
            try
            {
                var db = _postContentRepository.Find(a => a.PostContentId == postContentId, false).FirstOrDefault();
                if (db == null) return false;

                _postContentRepository.Delete(db);
                return true;
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
        }
    }