/// <summary> /// Creates a <see cref="ActiveRecordModel"/> from the specified type. /// </summary> /// <param name="type">The type.</param> /// <returns></returns> public ActiveRecordModel Create(Type type) { if (type == null) { throw new ArgumentNullException("type"); } if (type.IsDefined(typeof(ActiveRecordSkipAttribute), false)) { return(null); } ActiveRecordModel model = new ActiveRecordModel(type); coll.Add(model); PopulateModel(model, type); ActiveRecordBase.Register(type, model); return(model); }