protected internal T ExecuteGet(string SPName, object ID, bool AggregateRoot = false) { SqlParameter[] sqlParameters = new SqlParameter[1]; sqlParameters[0] = new SqlParameter("@ID", ID); DataTable dataTable = (DataTable)_StoredProcedure.ExecuteTable(SPName, sqlParameters); T Obj = (T)_entityContainer.Resolve <T>(); if (dataTable.Rows.Count > 0) { SetItemFromRow(Obj, dataTable.Rows[0]); } if (AggregateRoot == true) { Obj = PopulateAggregates(Obj); } return(Obj); }