All pastes #778400 Raw Edit

AR HasMany Problem

public text v1 · immutable
·published 2007-11-17 15:16 UTC
rendered paste body
[ActiveRecord]
	public class Site : ActiveRecordBase<GymSite>
	{
		private int _id;
		private string _name;
		private IList<Department> _departments = new List<Department>();

		[PrimaryKey]
		public int Id
		{
			get { return _id; }
			set { _id = value; }
		}

		[Property]
		public string Name
		{
			get { return _name; }
			set { _name = value; }
		}

		[HasMany(typeof(Department))]
		public IList<Department> Departments
		{
			get { return _departments; }
			set { _departments = value; }
		}
	}