Click here to Skip to main content
15,895,746 members
Articles / Web Development / ASP.NET

Eucalypto - ASP.NET CMS Library using NHibernate

Rate me:
Please Sign up or sign in to vote.
4.84/5 (36 votes)
10 Jun 2009MIT24 min read 321.3K   4.6K   260  
An ASP.NET server library for creating CMS website (forums, articles/wiki, news, users/roles, ...), using NHibernate for data access.
using System;
using System.Collections.Generic;
using System.Configuration.Provider;

namespace Eucalypto.News
{
    /// <summary>
    /// NewsProvider abstract class. 
    /// A NewsProvider can be used to store news.
    /// 
    /// </summary>
    public abstract class NewsProvider : ProviderBase
    {
        #region Category
        public abstract Category CreateCategory(string name, string displayName);

        public abstract void UpdateCategory(Category category);

        public abstract void DeleteCategory(Category category);

        public abstract Category GetCategory(string id);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <param name="throwIfNotFound">True to throw an exception if the entity is not found. If false and the entity is not found return false</param>
        /// <returns></returns>
        public abstract Category GetCategoryByName(string name, bool throwIfNotFound);

        public abstract IList<Category> GetAllCategories();
        #endregion

        #region Items
        public abstract Item CreateItem(Category category, string owner,
                                        string title, string description,
                                        string url, string urlName,
                                        DateTime newsDate);

        public abstract IList<Item> GetItems(Category category,
                                            PagingInfo paging);

        public abstract void UpdateItem(Item item);

        public abstract void DeleteItem(Item item);

        public abstract Item GetItem(string id);

        public abstract IList<Item> FindItems(Filter<string> categoryName,
                                            Filter<string> tag, 
                                           DateTime? fromDate, DateTime? toDate,
                                           PagingInfo paging);

        #endregion
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
Italy Italy
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions