Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey C# (CSharp) Method

FindByPrimaryKey() protected static method

Finds an object instance by an unique ID
protected static FindByPrimaryKey ( Type targetType, object id ) : object
targetType System.Type The AR subclass type
id object ID value
return object
		protected internal static object FindByPrimaryKey(Type targetType, object id)
		{
			return FindByPrimaryKey(targetType, id, true);
		}

Same methods

ActiveRecordBase::FindByPrimaryKey ( Type targetType, object id, bool throwOnNotFound ) : object

Usage Example

示例#1
0
 public static T TryFind(object id)
 {
     return((T)ActiveRecordBase.FindByPrimaryKey(typeof(T), id, false));
 }
All Usage Examples Of Castle.ActiveRecord.ActiveRecordBase::FindByPrimaryKey