public void UpdateForumElement(ForumModel updatedForumElement)
 {
     ForumDataProvider.ExecuteNonQuery("sp_FMUpdateForumElement",
         new SqlParameter("@forumElementId", updatedForumElement.Id),
         new SqlParameter("@title", updatedForumElement.Title),
         new SqlParameter("@message", updatedForumElement.MessageText));
 }
        /****************** Async methods ******************/

        public async Task<ForumModel> CreateTopicAsync(ForumModel newTopic)
        {
            Guid id = await ForumDataProvider.ExecuteScalarAsync<Guid>("sp_FMInsertTopic",
                new SqlParameter("@ownID", newTopic.OwnerId),
                new SqlParameter("@ownType", newTopic.OwnerType),
                new SqlParameter("@tit", newTopic.Title),
                new SqlParameter("@msgText", newTopic.MessageText));

            newTopic.Id = id;

            return newTopic;
        }
        public ForumModel CreateMessage(ForumModel newMessage)
        {
            Guid id = ForumDataProvider.ExecuteScalar<Guid>("sp_FMInsertMessage",
                new SqlParameter("@parentId", newMessage.ParentId),
                new SqlParameter("@ownID", newMessage.OwnerId),
                new SqlParameter("@ownType", newMessage.OwnerType),
                new SqlParameter("@tit", newMessage.Title),
                new SqlParameter("@msgText", newMessage.MessageText));

            newMessage.Id = id;

            return newMessage;
        }
 public async Task UpdateForumElementAsync(ForumModel updatedForumElement)
 {
     await ForumDataProvider.ExecuteNonQueryAsync("sp_FMUpdateForumElement",
         new SqlParameter("@forumElementId", updatedForumElement.Id),
         new SqlParameter("@title", updatedForumElement.Title),
         new SqlParameter("@message", updatedForumElement.MessageText));
 }