All pastes #345619 Raw Edit

Something

public text v1 · immutable
·published 2007-02-08 17:49 UTC
rendered paste body
using System.Collections.Generic;
using Castle.ActiveRecord;

namespace NetCoders.NFSCars.Model.Link
{
    [ActiveRecord("LinksCategories")]
    public class LinkCategory : ActiveRecordBase<LinkCategory>
    {
        #region Properties / Methods
        private int _categoryId;
        private string _name;

        [PrimaryKey(PrimaryKeyType.Native, "CategoryID")]
        public int CategoryID
        {
            get
            {
                return _categoryId;
            }
            set
            {
                _categoryId = value;
            }
        }

        [Property("Name", NotNull = true)]
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }
        #endregion

        #region FindAll
        public new static List<LinkCategory> FindAll()
        {
            return new List<LinkCategory>(ActiveRecordBase<LinkCategory>.FindAll());
        }
        #endregion
    }
}